instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I'm trying to debug a deadlock in a multi-threaded Python application after it has locked up. Is there a way to attach a debugger to inspect the state of the process? </p>
<p>Edit: I'm attempting this on Linux, but it would be great if there were a cross-platform solution. It's Python after all :)</p>
| <p>Yeah, gdb is good for lower level debugging.</p>
<p>You can change threads with the <em>thread</em> command.</p>
<p>e.g</p>
<pre><code>(gdb) thr 2
[Switching to thread 2 (process 6159 thread 0x3f1b)]
(gdb) backtrace
....
</code></pre>
<p>You could also check out Python specific debuggers like <a href="http://win... | <p>What platform are you attempting this on? Most debuggers allow you to attach to a running process by using the process id.
You can either output the process id via logging or using something like Task Manager.
Once that is achieved it will be possible to inspect individual threads and their call stacks.</p>
<p>EDIT... | 6,996 |
<p>I'd like to use alternatives to System Center Virtual Machine Manager 2008 is possible, in other words, any FREE tools?</p>
| <p>Before SCVMM, Microsoft's solution was the <a href="http://technet.microsoft.com/en-us/virtualserver/bb676674.aspx" rel="nofollow noreferrer">Virtual Server Migration Toolkit</a>. This requires Windows Server 2003 Automated Deployment Services, which in turn can only be installed on Windows Server 2003 Enterprise Ed... | <p>Use VMWare its not free, but you can get a decent 30 day trial, which should be enough to do your conversions. VMWare also has other great advantages if you're willing to pay for the product. </p>
| 9,001 |
<p>I would have thought this would be an easy one to Google, but I've been unsucessful.</p>
<p>I want to assign a variable the value out of an attribute (easy so far) then use that variable to select another node based on the value of that attribute.</p>
<p>Example:</p>
<pre><code><xsl:variable name="myId" select... | <p>Ok, I finally figured it out. Silly problem really, I simply needed to leave out the quotes and the braces. One of those times when I <em>thought</em> that I'd already tried that. :D Oh, and I mistyped @myId in the first example, the code was actually $myId.</p>
<pre><code><xsl:variable name="myId" select="@... | <p>You seem to have got confused with use of a variable (which is just $variable) and Attribute Value Templates, which allow you to put any XPath expression in some attributes, e.g. </p>
<pre><code><newElement Id="{@Id}"/>
</code></pre>
<p>They can obviously be combined, so you can include a variable in an Attr... | 2,730 |
<p>I'm having issues with ripples on the first layer of big flat prints. The initial corner of a big flat print is fine, but then ripples begin to form as shown in the screenshot.</p>
<p>I'm just a newbie, so I was thinking they might have something to do with heat or contraction or something. Normally, I use the defa... | <p>The main problem is solved (first layer thickness vs leveled nozzle height).</p>
<p>The following image shows the problem. I was running with a default 0.3 mm first layer (the tooltip setting says a slightly thicker layer helps with adhesion). The build plate was correctly leveled with "midrange" friction ... | <ol>
<li><p>The first that I have in mind was connected with an acceleration, so you could play with it (set to half the current value and see the results)</p></li>
<li><p>The other source of that could be drive belt that is fiddling a little bit on the motor and idler shaft (visual check for any play on the motor/shaf... | 1,073 |
<p>I recently got a Creality Ender-3, and tried printing a few things for some tests. I’ve printed a cube and just printed a cylindrical tube today, and I notice each time, it adds this random line on the left and a sort of outline around the actual print. Neither of these were there in my Cura file, but they’re always... | <p>If the printer is printing, it is instructed to do so by the <a href="https://reprap.org/wiki/G-code" rel="nofollow noreferrer">G-code</a> file unless you are printing through an external software program that has extra G-code to print before your print starts. E.g. in OctoPrint print server it is possible to execut... | <p>These are features, not bugs. </p>
<p>The line off to the left is the "priming line"; the printer is extruding a bead of material to ensure that any oozing is cleaned off of the filament tip, and that the filament is properly pressed into the hotend and flowing consistently from the nozzle, before beginning your pr... | 1,504 |
<p>I have got a simple contacts database but I'm having problems with users entering in duplicate data. I have implemented a simple data comparison but unfortunately the duplicated data that is being entered is not exactly the same. For example, names are incorrectly spelled or one person will put in 'Bill Smith' and a... | <p>You can compare the names with the <a href="http://en.wikipedia.org/wiki/Levenshtein_distance" rel="noreferrer">Levenshtein distance</a>. If the names are the same, the distance is 0, else it is given by the minimum number of operations needed to transform one string into the other.</p>
| <p>You might also want to look into probabilistic matching. </p>
| 5,143 |
<p>I haven't been to enough of these "live" events to really determine which, if any, are worth the time / money. Which ones do you attend and why?</p>
| <p>For conventions, if you're still in university, and can make it to Montreal, Canada, the <a href="http://www.cusec.net/" rel="nofollow noreferrer">Canadian Undergraduate Software Engineering Conference</a> (CUSEC) has been extremely enjoyable. See the <a href="http://2009.cusec.net/" rel="nofollow noreferrer">2009<... | <p>I used to belong to my local Linux User Group which I co-founded but I treated it more as a social event than anything else but obviously a social event full of geeks is still a great way to get a great debate going :)</p>
<p>Conventions and the like I've not got much out of other than being pestered by businesses ... | 4,604 |
<p>Apologies, I'm a EE designer and software guy. We've been CNC'ing prototypes, and my office just bought a very cheap 3D printer.</p>
<p>I'm using Cura as recomended, and wanted to print a piece that has features on both sides.</p>
<p>Here is a screenshot of each side.</p>
<p>So if you laid one side flat, you see... | <p>I haven't tried printing anything like that, but one trick is to print the piece at an angle of 45°, so as to minimise the number of surfaces that are horizontal (or near horizontal.) You will still need some supports, but far less than if you just plonked it flat on the build plate. My only other recommendation wou... | <p>I haven't tried printing anything like that, but one trick is to print the piece at an angle of 45°, so as to minimise the number of surfaces that are horizontal (or near horizontal.) You will still need some supports, but far less than if you just plonked it flat on the build plate. My only other recommendation wou... | 693 |
<p>I have a multi-frame layout. One of the frames contains a form, which I am submitting through XMLHttpRequest. Now when I use document.write() to rewrite the frame with the form, and the new page I am adding contains any javascript then the javascript is not exectuted in IE6?</p>
<p>For example:</p>
<pre><code>docu... | <p>Workaround is to programmatically add <code><script></code> blocks to head DOM element in JavaScript at Callback function or call eval() method. It's only way you can make this work in IE 6.</p>
| <p>Another possible alternative is to use JSON, dynamically adding scripts references which will be automatically processed by browser. </p>
<p>Cheers.</p>
| 9,492 |
<p>When I am trying to print something on my home made 3D printer, I can print the first and second layer, then the Bowden extruder's gear starts slipping; it cannot push the filament anymore,the gear is turning but slipping; the filament cannot go forward.</p>
<p>I tried all configurations of the tightening screw of ... | <p>The PLA isn't advancing as fast as the gcode requires. Since you've already tried higher temperatures, try printing at half the speed (F value). If that works, try 3/4 of the original F value, etc., until you find the best feed rate at this temperature for your material, printer, and model.</p>
| <p>I had such effects and fixed it by reducing the flow. It might be that your filament is thicker than it should be. Therefore too much filament ends up in the nozzle. Once the molten filament accumulates enough to rise to the cold end of the hot end it solidifies and nothing moves anymore -> clicking.</p>
<p>So eith... | 1,390 |
<p>I am printing a small cylinder, but when the object is finished, it's smaller than the measures I used when create the model.</p>
<p>I used thincerkad to make a simple model, the measures are:</p>
<ul>
<li>width: 90 mm</li>
<li>height: 2 mm</li>
</ul>
<p>After the print was done, the actual dimensions were:</p>
... | <p>Let's do the math, you printed something of size 9 cm and got a size of 7 cm. This implies that the scale equals <span class="math-container">$\frac{7}{9}=0.778$</span>. In order to print it at the correct size, you should have printed the object at scale <span class="math-container">$\frac{1}{0.778}=1.286... | <p>Are you using the stock firmware of your printer? Sounds like to me that you have 16 tooth pulleys and your firmware is set to 20 tooth i.e. 80 steps per mm</p>
<p>The calculation behind the steps per mm is <span class="math-container">$\frac{\text{Steps per Revolution} \times Microsteps}{Teeth \times Pitch}$</span... | 1,364 |
<p>How can I get line numbers to <code>print</code> in <strong>Visual Studio 2005</strong> when printing <code>code</code> listings?</p>
| <p>There is an option in the Print Dialog to do the same (in VS 2005 and 2008 atleast)!</p>
| <p>Isn't there an option in the Print Dialog?</p>
<p>Edit: There is. Go to File => Print, and then in the bottom left there is "Print what" and then "Include line Numbers"</p>
| 2,586 |
<p>In the E3D Kraken cooler block, there is a big, 10 mm grub screw, along the side of the cooler block.</p>
<p>I watched the entire Kraken assembly video:</p>
<p><div class="youtube-embed"><div>
<iframe width="640px" height="395px" src="https://www.youtube.com/embed/wEw4UDUUbIE?start=0"></ifram... | <p>My problem was 2 things. The <strong>heatbreak</strong>, which was switched out for the MK2 version(Explantation below). And the <strong>Teflon Tube</strong> that runs down the heatsink.</p>
<h2>Heatbreak</h2>
<p>Change the heat-break to a generic E3D one. You can order the heatbreak for the <strong>MK2</strong> f... | <p>The problem with low layer heights is that the filament flow is low, this means that the filament is at prolonged times at temperature, filament cooking can cause clogging. Try increasing the layer height to 0.2 mm to observe if the same clogging problems still occur, furthermore, try lowering the extrusion tem... | 1,512 |
<p>I am using Java back end for creating an XML string which is passed to the browser. Currently I am using simple string manipulation to produce this XML. Is it essential that I use some XML library in Java to produce the XML string?
I find the libraries very difficult to use compared to what I need.</p>
| <p>It's not essential, but advisable. However, if string manipulation works for you, then go for it! There are plenty of cases where small or simple XML text can be safely built by hand.</p>
<p>Just be aware that creating XML text is harder than it looks. Here's some criteria I would consider:</p>
<ul>
<li>First: how... | <p>No - especially for generating (parsing I would be less inclined to as input text can always surprise you). I think its fine - but be prepared to shift to a library should you find yourself spending more then a few minutes maintaining your own code. </p>
| 4,450 |
<p>How do you write the syntax for a While loop?</p>
<h2>C<code>#</code></h2>
<pre><code>int i = 0;
while (i != 10)
{
Console.WriteLine(i);
i++;
}
</code></pre>
<h2>VB.Net</h2>
<pre><code>Dim i As Integer = 0
While i <> 10
Console.WriteLine(i)
i += 1
End While
</code></pre>
<h2>PHP</h2>
... | <p>In PHP a while loop will look like this:</p>
<pre><code><?php
while(CONDITION)
{
//Do something here.
}
?>
</code></pre>
<p>A real world example of this might look something like this</p>
<pre><code><?php
//MySQL query stuff here
$result = mysql_query($sql, $link) or die("Opps");
while($row = mysql_fetch... | <h2>TCL</h2>
<pre><code>set i 0
while {$i != 10} {
puts $i
incr i
}
</code></pre>
<p>C++, C, JavaScript, Java and a myriad of other C-like languages all look exactly the same as C#, except in the way that they write the output to the console, or possibly the way you create the variable <code>i</code>. Answer... | 6,384 |
<p><a href="https://3dprinting.stackexchange.com/questions/413/methods-for-smoothing-3d-objects">Methods for smoothing 3D objects</a></p>
<p>So... maybe one day it becomes community wiki. I think that we need this type of questions, so we can provide more detailed answers to methods and practices.</p>
| <p><em>"is still too broad?"</em> is answered by your own question, <em>"we can provide more detailed answers"</em>. </p>
<p>The problem essentially is that this Q&A format isn't suited to very long treatises on this type of subject. It's far better to ask a specific question such as <em>"How do I smooth this AB... | <p><em>"is still too broad?"</em> is answered by your own question, <em>"we can provide more detailed answers"</em>. </p>
<p>The problem essentially is that this Q&A format isn't suited to very long treatises on this type of subject. It's far better to ask a specific question such as <em>"How do I smooth this AB... | 20 |
<p>C#: What is a good Regex to parse hyperlinks and their description?</p>
<p>Please consider case insensitivity, white-space and use of single quotes (instead of double quotes) around the HREF tag.</p>
<p>Please also consider obtaining hyperlinks which have other tags within the <code><a></code> tags such as <... | <p>As long as there are no nested tags (and no line breaks), the following variant works well:</p>
<pre><code><a\s+href=(?:"([^"]+)"|'([^']+)').*?>(.*?)</a>
</code></pre>
<p>As soon as nested tags come into play, regular expressions are unfit for parsing. However, you can still use them by applying more a... | <p>Just going to throw this snippet out there now that I have it working..this is a less greedy version of one suggested earlier. The original wouldnt work if the input had multiple hyperlinks. This code below will allow you to loop through all the hyperlinks:</p>
<pre><code>static Regex rHref = new Regex(@"<a.*?hr... | 4,589 |
<p>Sparked by <a href="https://3dprinting.stackexchange.com/questions/1245/running-12v-on-a-24v-heater-cartridge">this question</a>, I wanted to discuss the most efficient and also the easiest ways of thermally insulating the heat block of the hotend.</p>
<p>I have seen <a href="http://numbersixreprap.blogspot.fr/2013... | <p>The "quick and dirty" approach is to just slap a bunch of Kapton tape on there. The more the better! (Until you need to dismantle for maintenance, anyway.)</p>
<p>I find pre-cut ceramic tape + kapton tape "blankets" to be easy and effective. E3Dv6 and Replicator 1/2 style hot blocks should be compatible. Or you can... | <p>After having seen <a href="https://3dprinting.stackexchange.com/questions/4026/how-can-i-insulate-my-thermistor/4035#4035">this answer</a> to this question, <a href="https://3dprinting.stackexchange.com/questions/4026/how-can-i-insulate-my-thermistor">How can I insulate my thermistor?</a>, I ordered these, from eBay... | 301 |
<p>I am building a Prusa i3 MK2S (<a href="https://toms3d.org/2017/02/23/building-cheapest-possible-prusa-i3-mk2/" rel="nofollow noreferrer">Dolly</a>). I find it very difficult to find M5 rods for the Z axis, I have an M8 lead screw with 8 mm lead, So I thought since M8 is widely available online I could just use... | <p>as long as you match the parts that is ok.
The m8 rod will give you more stiffness and will be harder to bend.
As the result, you will have to calibrate the steps/mm settings in the firmware.</p>
| <p>You can use the screws and rods you can find easily, of course some dimensions will change and is needed to adjust parameters. </p>
<p>I used in my first 3D printer and standard screw of 9.5mm (3/8) the main problem was the coupling available in Mexico that werer none on that time.</p>
<p>You can buy the bearings ... | 839 |
<p>I really like <a href="http://www.devexpress.com/" rel="nofollow noreferrer">DevX</a> components, but they are pretty expensive, maybe anyone knows free equivalents ? or web site where I can look for some kind of free visual component for .NET</p>
| <p>Check out free <a href="http://www.componentfactory.com/products.php#toolkit" rel="noreferrer">Krypton Toolkit</a> of Component Factory.</p>
| <p>I second that. Krypton all the way. Some of their controls actually outperform the same Telerik control, too.</p>
| 8,437 |
<p>I'm not a SQL expert, and I'm reminded of the fact every time I need to do something beyond the basics. I have a test database that is not large in size, but the transaction log definitely is. How do I clear out the transaction log?</p>
| <p>Making a log file smaller should really be reserved for scenarios where it encountered unexpected growth which you do not expect to happen again. If the log file will grow to the same size again, not very much is accomplished by shrinking it temporarily. Now, depending on the recovery goals of your database, these a... | <p>DB Transaction Log <strong>Shrink to min size</strong>:</p>
<ol>
<li>Backup: Transaction log</li>
<li>Shrink files: Transaction log</li>
<li>Backup: Transaction log</li>
<li>Shrink files: Transaction log</li>
</ol>
<p>I made tests on several number of DBs: <strong>this sequence works</strong>. </p>
<p>It usually ... | 8,058 |
<p>When running my application I sometimes get an error about <code>too many files open</code>.</p>
<p>Running <code>ulimit -a</code> reports that the limit is 1024. How do I increase the limit above 1024? </p>
<p><strong>Edit</strong>
<code>ulimit -n 2048</code> results in a permission error.</p>
| <p>You could always try doing a <code>ulimit -n 2048</code>. This will only reset the limit for your current shell and the number you specify must not exceed the hard limit</p>
<p>Each operating system has a different hard limit setup in a configuration file. For instance, the hard open file limit on Solaris can be ... | <p>If some of your services are balking into ulimits, it's sometimes easier to put appropriate commands into service's init-script. For example, when Apache is reporting</p>
<blockquote>
<p>[alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread</p>
</blockquote>
<p>Try to pu... | 5,490 |
<p>In XLST how would you find out the length of a node-set?</p>
| <pre><code><xsl:variable name="length" select="count(nodeset)"/>
</code></pre>
| <p>Generally in XSLT things aren't referred to as <code>Arrays</code>, since there is really no such thing in XSLT. The technical term is either <code>nodesets</code> (made up of zero or more nodes) or in XSLT 2.0 <code>sequences</code>.</p>
| 5,203 |
<p>So while doing some research I stumbled upon a <a href="https://reprap.org/wiki/Glass_Nozzles#Step_1_Assemble_Parts_and_Tools" rel="nofollow noreferrer">wiki page on reprap</a> from a few years back where the user was creating a glass nozzle to replace the brass and PTFE assembly.<a href="https://reprap.org/wiki/Gla... | <p>First off, this is not a glass nozzle, it is a whole hotend design. A super simplistic one.</p>
<p>Glass is, like ceramics, not a good thermal conductor but has a quite good thermal resistance - it only melts at about 1600 °C, which means you will never have to fight melting or warping of the filament path itself a... | <p>One shortcoming would be that when it comes back to lay down a new line next to an existing line, I would think that it would need to be able to melt the previously printed plastic, especially any bumps and strings.<br>
High thermal conductivity for good heat flow seems important.</p>
| 1,503 |
<p>I have the vmware server with this error, anyone knows how to fix it?<a href="http://soporte.cardinalsystems.com.ar/errorvmwareserver.jpg" rel="nofollow noreferrer">VMware Server Error http://soporte.cardinalsystems.com.ar/errorvmwareserver.jpg</a></p>
| <p>In the Network Connections on the host PC, you might try repairing the connections that are created by VMWare. Something like "VMWare Network Adapter VMnet1"</p>
<p>I'm assuming that the network connections (to a LAN/Internet) are working on the host computer. If not, I'd start by fixing the host first.</p>
| <p>There should be a vmware.log file or something similar in the directory that contains your vm. After you start the vm, are there any new errors in it? </p>
<p>Also, is the network adapter enabled?</p>
| 6,604 |
<p>I'm using the <a href="http://msdn.microsoft.com/en-us/library/ms178329.aspx" rel="nofollow noreferrer">ASP.NET Login Controls</a> and <a href="http://msdn.microsoft.com/en-us/library/aa480476.aspx" rel="nofollow noreferrer">Forms Authentication</a> for membership/credentials for an ASP.NET web application. And I'm... | <p>You pretty much need to keep the same data context available throughout the lifetime of the operations you want to perform if you're ever going to be storing changes which are to be <code>.SubmitChanges()</code>'d later, as otherwise you will lose those changes.</p>
<p>If you're just querying stuff then it's fine t... | <p>I think Jeff Atwood talked about this in the <a href="http://herdingcode.com/?p=36" rel="nofollow noreferrer">Herding Code podcast</a>, when he was questioned about the exact same thing. Listen to it towards the last 15-20 minutes or so.</p>
<p>I think in SO, the datacontext is created in the Controller class. Not ... | 5,343 |
<p>I'm trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account.</p>
<p>I tested it from the command line like:</p>
<pre><code>wget -O - --no-check-certificate \
"https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&description=test"
</code></pre>
<p>This w... | <p>Can you sniff the traffic to find what's actually being sent? Is it sending any auth data at all and it's incorrect or being presented in a form the server doesn't like, or is it never being sent by firefox at all?</p>
| <p>Does calling the method twice work?</p>
<p>Seems to me that your authentication is being approved after the content arrives, so then a second attempt now works because you have the correct cookies.</p>
| 2,654 |
<p>I understand that this is probably more of an electronics question, but was hoping that someone with experience of using an Anet A6 in the UK (or a country outside of the US/China) may be able to help... or alternatively, someone knowledgeable in electronics!</p>
<p>I recently bought and assembled an Anet A6. I am ... | <p>The UK uses 230 V mains voltage. The 220 V designation is from the past, Europe is now using 230 V. You do not have to worry about the frequency.</p>
<p>You should place the switch to 220 V and plug the cord into the socket. The printer should start immediately booting (cycling) the printer firm... | <p>@Oscar was correct, so long as the switch is set at 220 V, the printer will turn on. I am adding this answer to help anyone else who has a similar problem.</p>
<p>I strongly recommend that you buy a multimeter if you have any power supply issues, as this helped me to figure out what was wrong.</p>
<p>There were th... | 1,551 |
<p>I have a sproc that puts 750K records into a temp table through a query as one of its first actions. If I create indexes on the temp table before filling it, the item takes about twice as long to run compared to when I index after filling the table. (The index is an integer in a single column, the table being inde... | <p>If you create a clustered index, it affects the way the data is physically ordered on the disk. It's better to add the index after the fact and let the database engine reorder the rows when it knows how the data is distributed.</p>
<p>For example, let's say you needed to build a brick wall with numbered bricks so t... | <p>this is because if the data you insert is not in the order of the index, SQL will have to split pages to make room for additional rows to keep them together logically</p>
| 4,851 |
<p>I'm planning to write a simple J2SE application to aggregate information from multiple web sources.</p>
<p>The most difficult part, I think, is extraction of meaningful information from web pages, if it isn't available as RSS or Atom feeds. For example, I might want to extract a list of questions from stackoverflow... | <p>You could look at how httpunit does it. They use couple of decent html parsers, one is nekohtml.
As far as getting data you can use whats built into the jdk (httpurlconnection), or use apache's </p>
<p><a href="http://hc.apache.org/httpclient-3.x/" rel="nofollow noreferrer">http://hc.apache.org/httpclient-3.x/</a><... | <p>In short, you may either parse the whole page and pick things you need(for speed I recommend looking at SAXParser) or running the HTML through a regexp that trims of all of the HTML... you can also convert it all into DOM, but that's going to be expensive especially if you're shooting for having a decent throughput.... | 9,701 |
<p>What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?</p>
| <p>From the <a href="http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html" rel="noreferrer">Java Tutorial</a>:</p>
<blockquote>
<p>Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are simply called static nested classes. Non-static nested class... | <p>The difference is that a nested class declaration that is also static can be instantiated outside of the enclosing class.</p>
<p>When you have a nested class declaration that is <em>not</em> static, also known as an <em>inner class</em>, Java won't let you instantiate it except via the enclosing class. The object c... | 9,569 |
<p>I have read about partial methods in the latest <a href="http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx" rel="noreferrer">C# language specification</a>, so I understand the principles, but I'm wondering how people are actually using them. Is there a particular design pattern that benefits from partial method... | <p>Partial methods have been introduced for similar reasons to why partial classes were in .Net 2.</p>
<p>A partial class is one that can be split across multiple files - the compiler builds them all into one file as it runs.</p>
<p>The advantage for this is that Visual Studio can provide a graphical designer for par... | <p>Here is the best resource for partial classes in C#.NET 3.0: <a href="http://msdn.microsoft.com/en-us/library/wa80x488(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/wa80x488(VS.85).aspx</a></p>
<p>I try to avoid using partial classes (with the exception of partials created by Visual... | 6,360 |
<p>Slashdot has a little widget that allows you to tweak your comment threshold to filter out down-modded comments. It will be in one place if you scroll to the top of the page, and as you scroll down, at some point, where its original home is about to scroll off the page, it will switch to fixed position, and stay on... | <p>Okay, I figured it out. I will post it here in case it help anyone else. This solution uses prototype, and an internal library that gives me the registerEvent, getElementX and getElementY functions, which do what you would think.</p>
<pre><code>var MenuManager = Class.create({
initialize: function initialize(... | <p>For a demo but not based on the code above checkout:</p>
<p><a href="https://stackoverflow.com/questions/2352896/fixing-tabs-to-the-top-of-the-page-but-underneath-the-header">fixed-floating-elements</a></p>
| 8,059 |
<p>I would like to retrieve the ethernet address of the network interface that is used to access a particular website.</p>
<p>How can this be done in Java?</p>
<p><strong>Solution</strong> Note that the accepted solution of <code>getHardwareAddress</code> is only available in Java 6. There does not seem to be a solut... | <p><a href="http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getHardwareAddress%28%29" rel="noreferrer"> java.net.NetworkInterface.getHardwareAddress</a> (method added in Java 6)</p>
<p>It has to be called on the machine you are interested in - the MAC is not transferred across network boundaries (... | <p>You can get the address that connects to your ServerSocket using <a href="http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getInetAddresses()" rel="nofollow noreferrer">http://java.sun.com/javase/6/docs/api/java/net/NetworkInterface.html#getInetAddresses()</a></p>
<p>However if your client is co... | 5,411 |
<p>In PHP, how can I replicate the expand/contract feature for Tinyurls as on search.twitter.com?</p>
| <p>If you want to find out where a tinyurl is going, use fsockopen to get a connection to tinyurl.com on port 80, and send it an HTTP request like this</p>
<pre><code>GET /dmsfm HTTP/1.0
Host: tinyurl.com
</code></pre>
<p>The response you get back will look like</p>
<pre><code>HTTP/1.0 301 Moved Permanently
Connecti... | <p>Another simple and easy way:</p>
<pre><code><?php
function getTinyUrl($url) {
return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
}
?>
</code></pre>
| 8,769 |
<p>When a java based application starts to misbehave on a windows machine, you want to be able to kill the process in the task manager if you can't quit the application normally. Most of the time, there's more than one java based application running on my machine. Is there a better way than just randomly killing java.e... | <p>Download <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="noreferrer">Sysinternal's Process Explorer</a>. It's a task manager much more powerfull than Windows's own manager. </p>
<p>One of it's features is that you can see all the resources that each process is using (like registry keys,... | <p>I'd suggest downloading Process Explorer from Sysinternals and looking at the different java.exe processes more closesly, that way you can get a better idea of which one to kill.</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-... | 8,782 |
<p>I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e.</p>
<pre><code>MyClass *m = (MyClass *)ptr;
</code></pre>
<p>all over the place, but there seem to be two other types of casts, and I don't k... | <h2>static_cast</h2>
<p><code>static_cast</code> is used for cases where you basically want to reverse an implicit conversion, with a few restrictions and additions. <code>static_cast</code> performs no runtime checks. This should be used if you know that you refer to an object of a specific type, and thus a check woul... | <p><code>dynamic_cast</code> has runtime type checking and only works with references and pointers, whereas <code>static_cast</code> does not offer runtime type checking. For complete information, see the MSDN article <em><a href="http://msdn.microsoft.com/en-us/library/c36yw7x9(VS.80).aspx" rel="noreferrer">static_cas... | 4,767 |
<p>How can my app get a valid "last time connected to domain" timestamp from Windows, even when the app is running offline?</p>
<p>Background:
I am writing an application that is run on multiple client machines throughout my company. All of these client machines are on one of the AD domains implemented by my company.... | <p>I don't believe this value is stored on the client machine. It's stored in Active Directory, and you can get a list of inactive machines using the <a href="http://technet.microsoft.com/en-us/library/cc730720.aspx" rel="nofollow noreferrer">Dsquery</a> tool.</p>
<p>The best option is to have your program do a simple... | <p>IMHO i dont think the client machine would store a timestamp of the last time it communicated with AD. This information is stored in active directory itself (ie. on the DC)</p>
<p>Once a user logs into say a Windows machine the credentials are cached. If that machine is disconnected from the network the credential... | 8,883 |
<p>Looking in the Cura interface, I can set any whole number 0-100 for the infill percentage. Does Cura have an algorithm to calculate a pattern for any of those possible values, or does it have a few patterns where it selects the closest one?</p>
| <p>I fear I'm going to deny your question. The infil percentage and the infil pattern are two orthogonal properties, both of which contribute to the strength, density, mass, and print time of an object. Since there's no way for an algo to "know" what your desired outcome is, this can't be done.</p>
<p>Note - I used... | <p>From what I can see, the only way to change the pattern is the manual way.
There is still an open gate to create a plugin that could select the pattern - but that is rather a complex solution - unless you will have a fully automated pipeline</p>
| 994 |
<p>Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.</p>
<p>Also, on the Intel Macs, can I use generic x86 asm? Or is there a modified instruction set? Any information about post Intel.</p>
<p>Also: I know that on windows, asm can run in an em... | <p>After installing any version of Xcode targeting Intel-based Macs, you should be able to write assembly code. Xcode is a suite of tools, only one of which is the IDE, so you don't have to use it if you don't want to. (That said, if there are specific things you find clunky, please file a bug at <a href="http://bugr... | <p>Forget about finding a IDE to write/run/compile assembler on Mac. But, remember mac is UNIX. See <a href="http://asm.sourceforge.net/articles/linasm.html" rel="nofollow noreferrer">http://asm.sourceforge.net/articles/linasm.html</a>. A decent guide (though short) to running assembler via GCC on Linux. You can mimic ... | 2,751 |
<p>I'm trying to import an XML file via a web page in a Ruby on Rails application, the code ruby view code is as follows (I've removed HTML layout tags to make reading the code easier)</p>
<pre><code><% form_for( :fmfile, :url => '/fmfiles', :html => { :method => :post, :name => 'Form_Import_DDR', :enct... | <p>Rather than a rails/mongrel problem, it sounds more likely that there's an issue either with your XML file or with the way REXML handles it. You can check this by writing a short script to read your XML file directly (rather than within a request) and seeing if it still fails.</p>
<p>Assuming it does, there are a ... | <p>Since getting this to work requires me to only change the encoding attribute of the first XML element to have the value UTF-8 instead of UTF-16, the XML file is actually UTF-8 and labelled wrongly by the application that generates it.</p>
<p>The XML file is a FileMaker DDR export produced by FileMaker Pro Advanced ... | 8,904 |
<p>Does anyone know of a hot end that is sealed? What I meaning is that the hot end has a rubber seal where the filament enters to keep the top airtight (in order to eliminate oozing).</p>
<p>I am looking to build a dual extruder printer but, I do not want any oozing from the hot end which is not in use. I could build ... | <p>There's a lot that can be done to improve the removability of supports, and much of this is not widely known/published.</p>
<p>One big wrong default in Cura that contributes to problems with support is <em>Limit Support Retractions</em>, which defaults to on. This causes heavy stringing between components of the sup... | <p>You could reduce the <code>Support Density</code>:</p>
<blockquote>
<p>A higher value results in better overhangs, but the supports are harder to remove.</p>
</blockquote>
<p>Furthermore read <a href="https://3dprinting.stackexchange.com/a/7991/">this answer</a> on question: "<a href="https://3dprinting.stackex... | 1,723 |
<p>Is there any risk of damaging stepper motors if I set too big travel speed?
What is maximum safe travel speed?</p>
<p>My printer is a German RepRap Neo.</p>
<p>I currently use 120 mm/s. Is it safe to increase this value to 200 mm/s?
What would my printer do if I set very big travel speed?</p>
| <p>Short answer <strong>no</strong></p>
<p>We use stepper drivers to limit the current, the travel speed is at capped by the amount of current supplied by the stepper drivers. This prevents the stepper motors from damaging themselves. You can set 200mm/s in the slicer, but you have no guarantee that that will be reach... | <p>A high speed is unlikely to be reached unless you also set a high acceleration, and acceleration is generally more likely to cause a problem (unless you reach the pulse rate limit of the drivers).</p>
<p>High acceleration will increase vibration, and critically requires higher torque from the motors. At some point,... | 1,199 |
<p>Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?</p>
| <p>You could try <a href="http://selenium.openqa.org/" rel="noreferrer">selenium</a>.</p>
| <p>The languages of choice of Firefox is Javascript. Unless you have a specific requirement that requires Python, I would advice you to use that.</p>
| 8,498 |
<p>When connecting to remote hosts via ssh, I frequently want to bring a file on that system to the local system for viewing or processing. Is there a way to copy the file over without (a) opening a new terminal/pausing the ssh session (b) authenticating again to either the local or remote hosts which works (c) even w... | <p><a href="http://zssh.sourceforge.net/" rel="noreferrer">zssh</a> (a <a href="http://en.wikipedia.org/wiki/ZMODEM" rel="noreferrer">ZMODEM</a> wrapper over openssh) does exactly what you want.</p>
<ul>
<li><p>Install <a href="http://zssh.sourceforge.net/" rel="noreferrer">zssh</a> and use it instead of openssh (whic... | <p>You should be able to set up public & private keys so that no auth is needed. </p>
<p>Which way you do it depends on security requirements, etc (be aware that there are linux/unix ssh worms which will look at keys to find other hosts they can attack).</p>
<p>I do this all the time from behind both linksys and ... | 7,248 |
<p><img src="https://cdn.shopify.com/s/files/1/0046/3781/8929/files/CR-10-Max-_2.gif" alt="Sensor" /></p>
<p><a href="https://i.stack.imgur.com/9fDW1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9fDW1.jpg" alt="enter image description here" /></a>
I'm just finishing the set-up of a CR-10 Max. It i... | <p>I've designed similar sensor casings, sometimes the filament catches a ridge/ledge or part of the cavity, even when it is chamfered or rounded. The arm of the limit switch pushes the filament up, away from the filament straight path.</p>
<p>Have you tried cutting the filament under a very sharp angle, that may work.... | <p>Here is 3D model that better explains why it was catching and how to remedy the problem:</p>
<p><a href="https://i.stack.imgur.com/ooe48.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ooe48.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/dTy92.png" rel="no... | 1,704 |
<p>I am looking to manage a SQL Server 2008 DB using Management Studio 2005. The reason for this is because our server is a 64-bit machine and we only have the 64-bit version of the software. </p>
<p>Is this possible? </p>
<p>How about managing a SQL Server 2005 DB using Management Studio 2008?</p>
| <p>UPDATE: You can use <a href="http://support.microsoft.com/kb/943656" rel="noreferrer">Cumulative update package 5</a> for SQL Server 2005 Service Pack 2 to connect to 2008.</p>
<p>FIX:
50002151 946127 (<a href="http://support.microsoft.com/kb/946127/" rel="noreferrer">http://support.microsoft.com/kb/946127/</a>) FI... | <p>unless I'm mistaken and things have changed, you cannot use sql server 2008 to save a backup which restores to sql server 2005. I found this out the hard way :(</p>
| 7,535 |
<p>I'm looking to increase the printing speed, through increasing the volumetric flow rate, which is currently at 5 mm³/s. Larger amounts cause the feeding mechanism to skip steps.</p>
<p>I'm running at 190 °C, which helps with easier bridging less stringing and personally see no reason to increase the t... | <p>This is opinion-based, but the volcano has drawbacks that affect print quality, mine is oozier and sloppier than a V6 with the shorter, more precise melt zone. It isn’t a slam dunk upgrade, more of a special applications part. I think there is no point to using a Volcano unless you’re running big nozzles fast, like ... | <p>Yes, the Volcano or the Super Volcano allow for larger flow rate (typically when using larger nozzles), that is where they were designed for. Just the nozzle will not help you, you need this larger nozzle shaft to be inside a Volcano heater block, else you cannot transfer the heat.</p>
<p>According to measurements f... | 1,651 |
<p>I own a delta 3D printer. The problem is that, at the beginning of a print the extruder outputs dirty filament. I want a clean filament flow at the start of my prints!</p>
<p>How can I make the hotend exit the print surface (glass plate) by 10mm, extrude the bad filament and go back to printing again? Can this be d... | <p>You can achieve this using the <code>G1</code> command. I don't know your exact printer, but you should be able to use something like this (add to the start G-code in your slicer):</p>
<pre><code>G1 X0 Y62 Z0.2 F9000 ; Move slightly past edge of bed
G92 E0 ; Zero extruder position
G0 E1 F100 ; Extrude 1mm of fila... | <p>A lot of slicers will have a Wipe option. Here are some examples:</p>
<ul>
<li><p>See <a href="https://jinschoi.github.io/simplify3d-docs/" rel="nofollow noreferrer">Unofficial Simplify3D Documentation</a>. Go to the section talking about <em>Wipe Nozzle</em>, under the heading <strong>Extruder Tab</strong></p>
<b... | 357 |
<p>What's the best way to allow a user to browse for a file in C#?</p>
| <pre><code>using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = "Select a file";
if (dlg.ShowDialog()== DialogResult.OK)
{
//do something with dlg.FileName
}
}
</code></pre>
| <p>I would say use the standard "Open File" dialog box (<a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx" rel="nofollow noreferrer">OpenFileDialog</a>), this makes it less intimidating for new users and helps with a consistant UI.</p>
| 5,088 |
<p>How would one go about squaring the gantry relative to the frame?</p>
<p>Referring to the image below, distance A and distance B are not equal.</p>
<p>Also would this account for the reason why when I attempt to print a circle it is not perfectly circular, and when I try to print a square, it is tilted?</p>
<p><a hr... | <p>You indicated that you were using 24 volts, implying you have a 24 volt bed. ATX power supplies do not have 24 volt outputs. The highest is 12 volts which would heat up the bed, but not fast or probably to full temperature.</p>
| <p>voltage = current x resistance</p>
<p>An ATX PSU is designed to only allow approximately 16 amps per pair of YELLOW and BLACK wires. The yellow is 12 V and the black is GND. If your bed were rated at 24 V then its resistance would be higher than that of the 12 V bed. The best solution for you would be to get a 12 V ... | 1,748 |
<p>I'm about to start testing an intranet web application. Specifically, I've to determine the application's performance.</p>
<p>Please could someone suggest formal/informal standards for how I can judge the application's performance.</p>
| <p>Use some tool for stress and load testing. If you're using Java take a look at <a href="http://jakarta.apache.org/jmeter/" rel="noreferrer">JMeter</a>. It provides different methods to test you application performance. You should focus on:</p>
<ul>
<li><strong>Response time</strong>: How fast your application is ru... | <p>To test the front-end then YSlow is great for getting statistics for how long your pages take to load from a user perspective. It breaks down into stats for each specfic HTTP request, the time it took, etc. Get it at <a href="http://developer.yahoo.com/yslow/" rel="nofollow noreferrer">http://developer.yahoo.com/ysl... | 6,326 |
<p>I want to allow users to upload avatar-type images in a variety of formats (<strong>GIF, JPEG, and PNG at least</strong>), but to save them all as <strong>PNG database BLOBs</strong>. If the images are oversized, pixelwise, I want to resize them before DB-insertion.</p>
<p><strong>What is the best way to use GD to ... | <pre><code><?php
/*
Resizes an image and converts it to PNG returning the PNG data as a string
*/
function imageToPng($srcFile, $maxSize = 100) {
list($width_orig, $height_orig, $type) = getimagesize($srcFile);
// Get the aspect ratio
$ratio_orig =... | <p><a href="http://www.phpit.net/article/image-manipulation-php-gd-part2/" rel="nofollow noreferrer">This article</a> seems like it would fit what you want. You'll need to change the saving imagejpeg() function to imagepng() and have it save the file to a string rather than output it to the page, but other than that i... | 4,224 |
<p>Trying to honor a feature request from our customers, I'd like that my application, when Internet is available, check on our website if a new version is available.</p>
<p>The problem is that I have no idea about what have to be done on the server side.</p>
<p>I can imagine that my application (developped in C++ us... | <p>I would absolutely recommend to just do a plain HTTP request to your website. Everything else is bound to fail.</p>
<p>I'd make a HTTP GET request to a certain page on your site containing the version of the local application.</p>
<p>like</p>
<pre><code>http://www.example.com/update?version=1.2.4
</code></pre>
<... | <p>The simplest way to make this happen is to fire an HTTP request using a library like <a href="http://curl.haxx.se/libcurl/" rel="nofollow noreferrer">libcurl</a> and make it download an ini or xml file which contains the online version and where a new version would be available online.</p>
<p>After parsing the xml ... | 8,031 |
<p>My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error</p>
<pre><code>Could not connect to data source 'New Data Source':
The network connection was terminated because the host fai... | <p>Why, it certainly took Microsoft long enough to explicitly confirm this:</p>
<p><strong>proxy connections via DB2Connect is not supported by BizTalk DB2 Adapter</strong></p>
<p>Since our customer's policy is to only access DB2 databases via DB2Connect, the adapter is out of the question.</p>
<p><strong>MORE BACKG... | <p>I've never used this adapter but myself, so I'm guessing, but maybe it's to do with the account that BizTalk is using to connect or your ports are not configured correctly.</p>
| 4,455 |
<p>These days, i came across a problem with Team System Unit Testing. I found that the automatically created accessor class ignores generic constraints - at least in the following case:</p>
<p>Assume you have the following class:</p>
<pre><code>namespace MyLibrary
{
public class MyClass
{
public Nullable<T>... | <p>I vote bug. I don't see how this could be by design.</p>
| <p>Search for unit tests with generics on msdn. This is a known limitation. Vote for a resolution on Microsoft Connect, as it is definately needs resolving.</p>
| 9,042 |
<p>I'm building a RESTful web service which has multiple URIs for one of its resources, because there is more than one unique identifier. Should the server respond to a GET request for an alternate URI by returning the resource, or should I send an HTTP 3xx redirect to the canonical URI? Is <em>HTTP 303 (see also)</em>... | <p>I'd personally plump for returning the resource rather than faffing with a redirect, although I suspect that's only because my subcoscious is telling me redirects are slower.</p>
<p>However, if you were to decide to use a redirect I'd think a 302 or 307 might be more appropiate than a 303, although the <a href="htt... | <p>The answer from Ubiguchi had what I needed, except that I now think a redirect is the way to go, via the link to the HTTP 1.1 specifiction section on response codes. It turns out that I actually need a 301 redirect because the URI I'm redirecting to is more 'correct' and stable, and should therefore be used for futu... | 5,169 |
<p>Suppose I have a stringbuilder in C# that does this:</p>
<pre><code>StringBuilder sb = new StringBuilder();
string cat = "cat";
sb.Append("the ").Append(cat).(" in the hat");
string s = sb.ToString();
</code></pre>
<p>would that be as efficient or any more efficient as having:</p>
<pre><code>string cat = "cat";
s... | <p><strong>NOTE:</strong> This answer was written when .NET 2.0 was the current version. This may no longer apply to later versions.</p>
<p><code>String.Format</code> uses a <code>StringBuilder</code> internally:</p>
<pre><code>public static string Format(IFormatProvider provider, string format, params object[] args)... | <p>I would suggest not, since String.Format was not designed for concatenation, it was design for formatting the output of various inputs such as a date.</p>
<pre><code>String s = String.Format("Today is {0:dd-MMM-yyyy}.", DateTime.Today);
</code></pre>
| 2,849 |
<p>I know that 3D printed parts can be coated in metal by painting them with conductive paint (graphite or copper seems to be usual) and then electroplating them in a commercial copper or nickel bath. The disadvantage of this process is that it does not coat insides very well, because those are not reached by the elect... | <p>Good day, I have experience in applying electroless nickel on difficult 3D parts, in your case, it's exceedingly difficult to do it directly to the printed piece. You will need to seal the piece with a more benign coating that will accept the palladium activator. Also, a sensitizer before the activator is needed.</p... | <p>You can use semiconductor processes like evaporation, sputtering, and chemical vapor deposition. These are expensive. Sputtering is probably the most feasable but it will have trouble with shadows.</p>
| 2,192 |
<p>What's the <strong>easiest</strong>, <strong>tersest</strong>, and most <strong>flexible</strong> method or library for parsing Python command line arguments?</p>
| <p><strong>This answer suggests <code>optparse</code> which is appropriate for older Python versions. For Python 2.7 and above, <code>argparse</code> replaces <code>optparse</code>. See <a href="https://stackoverflow.com/questions/3217673/why-use-argparse-rather-than-optparse">this answer</a> for more information.</str... | <p>I extended Erco's approach to allow for required positional arguments and for optional arguments. These should precede the -d, -v etc. arguments.</p>
<p>Positional and optional arguments can be retrieved with PosArg(i) and OptArg(i, default) respectively.
When an optional argument is found the start position of sea... | 4,042 |
<p>Does anyone know a good way to do this? I need to have simple forms that submit to email without writing a lot of code. These forms will be hosted in content-viewer web parts or similar in MOSS 2007. I'd like to avoid using InfoPath.</p>
| <p>You could use a list which would give you the input form.</p>
<p>It depends on a) whether people should be able to see each other's submissions and b) who the e-mail should go to.</p>
<p>You could set an alert (Actions -> Alert Me) to send an e-mail to a person/people when a new item is added to the list.</p>
<p>... | <p>With the sharepoint sdk, you can create your own webparts. If you add them to the GAC you can include them on your sharepoint site. You'd of course have to build a webpart for emailing though.</p>
| 8,917 |
<p>Printer: Ender 3 Pro - Direct drive, BLTouch, stock magnetic print bed surface<br />
Material: PLA - multiple brands</p>
<p>Slicer Settings:</p>
<ul>
<li>Layer Height .2 mm</li>
<li>Initial Layer Height .1 mm</li>
<li>Line Width .4 mm (with .4 mm nozzle) and also tried .39 mm</li>
<li>Wall thickness 1.2 mm (3 lines)... | <p>Assuming you do have a direct drive system as described.
Is this correct?</p>
<blockquote>
<p>Retraction Distance 6 mm speed 25 mm/s</p>
</blockquote>
<p>A retraction distance of 6 mm for direct a drive is huge and could easily be pulling the filament out so far it might become problematic. Most of my direct drive p... | <p>You appear to have severe underextrusion. It may be that you are trying to melt plastic faster than your printer can physically accomplish which would explain why it starts good and then the nozzle gets cold and then as the layers get small it comes good.
That doesn't explain why reducing the print speed doesn't hel... | 2,000 |
<p>Is there any way in IIS to map requests to a particular URL with no extension to a given application.</p>
<p>For example, in trying to port something from a Java servlet, you might have a URL like this...</p>
<p><a href="http://[server]/MyApp/HomePage?some=parameter" rel="nofollow noreferrer">http://[server]/MyApp... | <p>With AIR on Linux, it is easy to write to stdout, since the process can see its own file descriptors as files in /dev.</p>
<p>For stdout, open <code>/dev/fd/1</code> or <code>/dev/stdout</code> as a <code>FileStream</code>, then write to that.</p>
<p>Example:</p>
<pre><code>var stdout : FileStream = new FileStrea... | <p>If you are using a debug Flash Player, you can have the Flash Player log trace messages to a file on your system.</p>
<p>If you want real time messages, then you could tail the file.</p>
<p>More info:</p>
<p><a href="http://blog.flexexamples.com/2007/08/26/debugging-flex-applications-with-mmcfg-and-flashlogtxt/" ... | 5,959 |
<p>My problem is that I have used a 3D printing machine from the University and found out that the cover for the car was not smooth even after using sanding paper and painting it.</p>
<p>What material would work best to print the cover of the Cyber truck. I want it to be light and smooth.</p>
<p>I have to print it f... | <p>I have 3D printed models which were then sanded using progressively finer grades of sandpaper, terminating with wet sanding using micromesh to 12000 grit. The result was smooth and shining without any coating applied.</p>
<p>If your original results were not acceptable, the process may have been flawed and should b... | <h2>Choice of Material</h2>
<p>PLA is an obvious choice, but it has drawbacks compared with ABS.</p>
<ol>
<li>PLA is more brittle than ABS.</li>
<li>PLA softens at a lower temperature than ABS. </li>
<li>PLA is not treatable with acetone for vapor smoothing.</li>
<li>PLA can not be glued
with (most) solvent-based... | 1,596 |
<p>I have been tasked with going through a number of ColdFusion sites that have recently been the subject of a rather nasty SQL Injection attack. Basically my work involves adding <code><cfqueryparam</code>> tags to all of the inline sql. For the most part I've got it down, but can anybody tell me how to use cfque... | <p>@Joel, I have to disagree.</p>
<pre><code>select a,b,c
from Foo
where name like <cfqueryparam cfsqltype="columnType" value="%#variables.someName#%" />
</code></pre>
<ol>
<li><p>Never suggest to someone that they should "select star." Bad form! Even for an example! (Even copied from the question!)</p></li>
<l... | <pre><code>select a,b,c
from Foo
where name like <cfqueryparam cfsqltype="cf_sql_varchar" value="%Bob%" />;
</code></pre>
| 6,872 |
<p>I need to enumerate all the user defined types created in a <code>SQL Server</code> database with <code>CREATE TYPE</code>, and/or find out whether they have already been defined.</p>
<p>With tables or stored procedures I'd do something like this:</p>
<pre><code>if exists (select * from dbo.sysobjects where name='... | <p>Types and UDTs don't appear in sys.objects.
You should be able to get what you're looking for with the following:</p>
<pre><code>select * from sys.types
where is_user_defined = 1
</code></pre>
| <p>To expand on jwolly2's answer, here's how you get a list of definitions including the standard data type:</p>
<pre><code>-- User Defined Type definitions TP 20180124
select t1.name, t2.name, t1.precision, t1.scale, t1.max_length as bytes, t1.is_nullable
from sys.types t1
join sys.types t2 on t2.system_type_id = t1.... | 7,808 |
<p>Is there an api to bring the vista side bar to the front (Win+Space) programatically and to do the reverse (send it to the back ground).</p>
| <p>Probably using SetWindowPos you can change it to be placed the top / bottom of the z-order or even as the top-most window. You would need to find the handle to the sidebar using FindWindow or an application like WinSpy.</p>
<p>But after that something like.</p>
<p>Sets the window on top, but not top most.</p>
<pr... | <p>You probably shouldn't do it at all, since such action may annoy the user when executed at the wrong time (95% of cases*), just like stealing focus with a "Yes/No" prompt.</p>
<p>Unless your product's task is to toggle the sidebar of course. ;)</p>
<p>There's no official API for that anyway.</p>
<p>*Purely hypoth... | 9,722 |
<p>Ok, here's a very short and to the point question. When trying to import a virtual PC 2004 Windows 2003 Server VM in VM Workstation 6.0.2 I'm getting an error 'unable to determine guest operating system'. Soo how to fix?</p>
| <p>From <a href="http://www.vi411.org/2007/03/08/vmware-converter-unable-to-determine-guest-operating-system.html" rel="nofollow noreferrer">here</a>:</p>
<ol>
<li><p>Make sure that that the VM is not currently running in VMware Server.</p></li>
<li><p>Make sure that VMware Server does not have a lock on the VM’s file... | <p>This is a fairly generic error from VMware Converter so I would try the following:</p>
<p>Step 1. Make sure you are running the latest version of VMware Converter. Updates seem to come pretty often for this tool.</p>
<p>Step 2. Check the VMware Converter log file. More often than not you will find the source of ... | 5,997 |
<p>ASP.NET server-side controls postback to their own page. This makes cases where you want to redirect a user to an external page, but need to post to that page for some reason (for authentication, for instance) a pain.</p>
<p>An <code>HttpWebRequest</code> works great if you don't want to redirect, and JavaScript i... | <p>Here's how I solved this problem today. I started from <a href="http://www.c-sharpcorner.com/UploadFile/desaijm/ASP.NetPostURL11282005005516AM/ASP.NetPostURL.aspx" rel="nofollow noreferrer">this article</a> on C# Corner, but found the example - while technically sound - a little incomplete. Everything he said was ... | <p>If you're using ASP.NET 2.0, you can do this with <a href="http://msdn.microsoft.com/en-us/library/ms178139.aspx" rel="nofollow noreferrer">cross-page posting</a>.</p>
<p>Edit: I missed the fact that you're asking about an <em>external</em> page. For that I think you'd need to have your ASP.NET page gen up an HTML... | 2,715 |
<p>I'm experimenting with Linq and am having trouble figuring out grouping. I've gone through several tutorials but for some reason can't figure this out.</p>
<p>As an example, say I have a table (SiteStats) with multiple website IDs that stores a count of how many visitors by type have accessed each site in total and... | <p>Actually, although Thomas' code will work, it is more succint to use a lambda expression:</p>
<pre><code>var totals =
from s in sites
group s by s.SiteID into grouped
select new
{
SiteID = grouped.Key,
Last30Sum = grouped.Sum( s => s.Last30 )
};
</code></pre>
<p>which uses the Sum extension method witho... | <p>Easiest way for me to illustrate is using in-memory objects so it's clear what's happening. LINQ to SQL should be able to take that same LINQ query and translate it into appropriate SQL.</p>
<pre><code>public class Site
{
static void Main()
{
List<Site> sites = new List<Site>()
{... | 5,527 |
<p>So I have some old filament that I originally got for a 3D pen. The problem is it's unlabeled and I haven't been able to find anything that might help me distinguish whether it's PLA or ABS. The bag it all came in says that wherever this filament came from only makes PLA and ABS so it's got to be on of those two.</p... | <p>Mick's suggestion is a good one. PLA may shed some color in acetone, but ABS will dissolve completely in a suitable amount of time. If you have dark filament, you can test by flexing the filament until it breaks. ABS will sometimes/often/usually fatigue with a white break line, while PLA does not exhibit this tenden... | <p>Just burn it and check flame color.</p>
<p>I know you mentioned that you would like to avoid heat test, but this method is much faster and easier then other techniques.</p>
<ul>
<li><a href="https://www.youtube.com/watch?v=bNKno20GMMQ" rel="nofollow noreferrer">3D printing filament burn test</a></li>
<li><a href="ht... | 1,750 |
<p>I recently became curious about the Line Width setting in Cura and why one might change it if they aren't using different size nozzle.</p>
<p>Since I've gotten my Ender 3, I've always kept the line width equal to my nozzle size (<em>0.4 mm</em>). I've <a href="https://www.reddit.com/r/3Dprinting/comments/5zxj1z/sho... | <p>There are several things at play that can make a wider line nice to have:</p>
<h1>First layer adhesion</h1>
<p>Due to some filaments having serious struggle to get the first line or layer stuck to the bed, it can be an easy fix to just increase the line width, generating a bigger Adhesive Force <span class="math-con... | <p>I'll give a short answer here: It's the volume. The the nozzle redistributes the volume of the plastic into a different shape. i.e. the nozzle is turning a cylinder of 0.4 mm diameter into a rectangle of the same volume, which a function of the layer height / volume = line width.</p>
| 1,045 |
<p>In general 3D printers are compact and smaller than RP machines. That's ok. But, what's the difference? 3D printers can be used as RP machine too.</p>
| <p>All rapid prototyping means is automatically producing a physical part from a cad model. 3D printing is a way to achieve rapid prototyping. There are 2 main methods of rapid prototyping: additive, and subtractive.</p>
<p>A 3D printer is additive- you add materials to an object layer by layer.</p>
<p>Usually, when ... | <p>A sintered metal printer is a version of a 3D printer that is rapid, but expensive. Seen 1 for 800,000$aud
Uses laser to melt metal particles like titanium.</p>
| 176 |
<p>I have reached the point where I've decided to replace my custom-built replication system with a system that has been built by someone else, mainly for reliability purposes. Can anyone recommend any replication system that is worth it? Is <a href="http://fibre.sourceforge.net" rel="noreferrer">FiBRE</a> any good?</p... | <p>I have used CopyCat to create a replication project. It allows you create your own replication client/server configuration using CodeGear Delphi. This allows you complete flexibilty as to how you want your replication to work.</p>
<p>If you don't use Delphi, or need a prefabricated solution, CopyTiger does the s... | <p>The Ibphoenix site list replication tools</p>
<p><a href="http://www.ibphoenix.com/download/tools/replication" rel="nofollow noreferrer">IbPhoenix Replication Tools</a></p>
| 8,727 |
<p>In a .NET project, say you have a configuration setting - like a connection string - stored in a app.config file, which is different for each developer on your team (they may be using a local SQL Server, or a specific server instance, or using a remote server, etc). </p>
<p>How can you structure your solution so th... | <p>AppSettings can be overridden with a local file:</p>
<pre><code><appSettings file="localoveride.config"/>
</code></pre>
<p>This allows for each developer to keep their own local settings.</p>
<p>As far as the connection string, in a perfect world all developers should connect to a test DB, not run SQL Serve... | <p>I always make templates for my config files. </p>
<p>As an example I use NAnt for the building of my projects. I have a file checked in called local.properties.xml.template. My NAnt build will warn the developer if local.properties.xml does not exist. Inside that file will be workstation specific settings. The temp... | 3,980 |
<p>I've been tasked with the the maintenance of a nonprofit website that recently fell victim to a SQL injection attack. Someone exploited a form on the site to add text to every available text-like field in the database (varchar, nvarchar, etc.) which, when rendered as HTML, includes and executes a JavaScript file. </... | <p>Restore the data from a recent backup.</p>
| <p>This will reverse that, also it would be wise to take sysobject permissions away from the username your site runs with, and to sanitize input of course</p>
<pre><code>DECLARE @T VARCHAR(255),@C VARCHAR(4000)
DECLARE Table_Cursor CURSOR FOR
SELECT a.name,b.name FROM sysobjects a,syscolumns b WHERE a.id=b.id and a... | 5,234 |
<p>In a <strong>Win32</strong> environment, you can use the <strong>GetLastInputInfo API</strong> call in <a href="https://learn.microsoft.com/windows/desktop/api/winuser/nf-winuser-getlastinputinfo" rel="nofollow noreferrer">Microsoft documentation</a>. Basically, this method returns the last tick that corresponds wi... | <p>As for Linux, I know that Pidgin has to determine idle time to change your status to away after a certain amount of time. You might open the source and see if you can find the code that does what you need it to do.</p>
| <p>You seem to have answered your own question there Nathan ;-)
"GetLastInputInfo" is the way to go.</p>
<p>One trick is that if your application is running on the desktop, and the user connects to a virtual machine, then GetLastInputInfo will report no activity (since there is no activity on the host machine).</p>
<... | 2,480 |
<p>When I use the sp_send_dbmail stored procedure, I get a message saying that my mail was queued. However, it never seems to get delivered. I can see them in the queue if I run this SQL:</p>
<pre><code>SELECT * FROM msdb..sysmail_allitems WHERE sent_status = 'unsent'
</code></pre>
<p>This SQL returns a 1:</p>
<pre>... | <p>Have you tried </p>
<pre><code>sysmail_stop_sp
</code></pre>
<p>then </p>
<pre><code>sysmail_start_sp
</code></pre>
| <p>Have you tried </p>
<pre><code>sysmail_stop_sp
</code></pre>
<p>then </p>
<pre><code>sysmail_start_sp
</code></pre>
| 3,046 |
<p>I have a web application that needs to read (and possibly write) files from a network share. I was wondering what the best way to do this would be?</p>
<p>I can't give the network service or aspnet accounts access to the network share. I could possibly use impersonation.</p>
<p>The network share and the web applic... | <p>Given everyone already has domain accounts. Try IIS integrated authentication. You will get an ugly logon box off network but your creds should pass down to the file share.</p>
<p>@lomaxx<br>
Are you saying that only you have perms to the share or that you manually mapped it to a drive letter. If the later you c... | <p>I've had no problems connecting to network shares transparently as if they were local drives. The only issue you may have is what you mentioned: having the <code>aspnet</code> account gain access to the share. Impersonation is probably the best way to do this.</p>
<p>You should be able to use any filestream objects... | 4,899 |
<p>I'm using a Java socket, connected to a server.
If I send a HEADER http request, how can I measure the response time from the server? Must I use a provided java timer, or is there an easier way?</p>
<p>I'm looking for a short answer, I don't want to use other protocols etc. Obviously do I neither want to have a so... | <p>I would say it depends on what exact interval you are trying measure, the amount of time from the last byte of the request that you send until the first byte of the response that you receive? Or until the entire response is received? Or are you trying to measure the server-side time only?</p>
<p>If you're trying ... | <p>Use AOP to intercept calls to the socket and measure the response time.</p>
| 9,444 |
<p>I have an List and I'd like to wrap it into an IQueryable.</p>
<p>Is this possible?</p>
| <pre><code>List<int> list = new List<int>() { 1, 2, 3, 4, };
IQueryable<int> query = list.AsQueryable();
</code></pre>
<p>If you don't see the <code>AsQueryable()</code> method, add a using statement for <code>System.Linq</code>.</p>
| <p>Use the <code>AsQueryable<T>()</code> extension method.</p>
| 9,929 |
<p>I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX).</p>
<p>I gather it can be done with Flash... | <p>Flash requires you to use a media server (note: I'm still using Flash MX, but a quick Google search brings up documentation for Flash CS3 that seems to concur - note that Flash CS4 is out soon, might change then). Macromedia / Adobe aim to flog you their media server, but the Red5 open-source project might be suitib... | <p>You could download Real Producer Basic, which is free here (<a href="http://forms.real.com/rnforms/products/tools/producerbasic/" rel="nofollow noreferrer">http://forms.real.com/rnforms/products/tools/producerbasic/</a>), and imbed it as an activeX object since it's on your intranet. Flash will embed the same way, ... | 8,948 |
<p>Where is a good place to start with making an application in .NET that communicates through <a href="http://www.opcfoundation.org/Default.aspx/01_about/01_whatis.asp" rel="nofollow noreferrer">OPC</a>?</p>
| <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,233 |
<p>For years I have been using the DEBUG compiler constant in VB.NET to write messages to the console. I've also been using System.Diagnostics.Debug.Write in similar fashion. It was always my understanding that when RELEASE was used as the build option, that all of these statements were left out by the compiler, free... | <p>The preferred method is to actually use the conditional attribute to wrap your debug calls, not use the compiler directives. #ifs can get tricky and can lead to weird build problems.</p>
<p>An example of using a conditional attribute is as follows (in C#, but works in VB.NET too):</p>
<pre><code>[ Conditional("De... | <p>In my experience choosing between Debug and Release in VB.NET makes no difference. You may add custom actions to both configuration, but by default I think they are the same.</p>
<p>Using Release will certainly not remove the System.Diagnostics.Debug.Write statements.</p>
| 4,854 |
<p>I'm starting to get familiar with 3D printers. I wish to know if printing details the size of 10<sup>-7</sup> m (3.9*10<sup>-6</sup> in) is possible these days with metals or any other material.</p>
<p>If anyone has information or articles as leads, I would really appreciate it.</p>
| <p>There are no 3D printers (that I'm aware of) that can do 0.0001 millimeters, hobbyist or industrial, plastic or metal. For that matter I think you'll be hard pressed to find a CNC mill with that type of tolerances. </p>
<p>Sorry!</p>
| <p>Today, only SLA/DLP will give features of that size (if even these technologies do), and I am unaware of anyone using these technologies to print with metals today.</p>
| 535 |
<p>i'm wondering if there is any nice and neat tool to replace the GNU Autotools or Make to build a very large C++ project, which are such a complicated thing to use. </p>
<p>It is simple to generate all the files that de Autotools require if the project is small, but if the source code is divided in many directories,... | <p>The <a href="http://code.google.com/p/v8/" rel="noreferrer">Google V8 JavaScript Engine</a> is written in C++ and uses <a href="http://www.scons.org/" rel="noreferrer">SCons</a>, so I guess that's one vote for it.</p>
| <p>I use <a href="http://www.bakefile.org/index.html" rel="nofollow noreferrer">bakefile</a> for my build process and I became a big fan!</p>
<p>I never have to write a Makefile myself anymore, let alone horrible GNU autotools scripts. All I have to do is provide an <code>XML</code> file that describes the build targe... | 7,827 |
<p>In my (PHP) web app, I have a part of my site that keeps a history of recent searches. The most recent queries get shown in a side box. If the query text is too long, I truncate it and show ellipses. Eg: "My very long query is..."</p>
<p>Currently, I truncate after a certain number of characters. Since the font is ... | <p>Here's another take on it and you don't have to live without the ellipsis!</p>
<pre><code><html>
<head>
<style>
div.sidebox {
width: 25%;
}
div.sidebox div.qrytxt {
height: 1em;
line-height: 1em;
overflow: hidden;
}
div.sidebox div.qrytxt span.ellipsis {
float: right;
}
<... | <blockquote>
<p>Does CSS have a way?</p>
</blockquote>
<p>No</p>
<blockquote>
<p>Does PHP?</p>
</blockquote>
<p>No</p>
<p>-</p>
<p>To do that you'd have to get the font metrics for each character, and apply them to all your letters in your string. While you could do this by using a drawing/rendering library li... | 5,401 |
<p>I've heard alot about simplify 3D recently. It sounds like it's a great software, but 150 dollars!? The only thing that seems too different from other slicers is the placable supports, but Z suite has that now as well. Cura must be coming out with placable supports soon if they're going to stay in the game. It does ... | <p>The free slicers are catching up with Simplify3D, and are even overtaking it in some areas, so purchasing it may not make much sense to hobbyists. However, for professional print shops, where printers may cost twenty times as much (or even more), 150 dollars is nothing (especially since it is 150 dollars per PC, not... | <p>Well, simplify 3D has more than only placeable supports and I'm very happy with it. I Made my 3D printers and I had headaches with free slicers due I had to review the final result on pronterface, of course this programs was unable to run perfectly on P4 PC's with XP. </p>
<p>When I started to change for other prog... | 763 |
<p>I'm running VisualSVN as my SVN server and using TortoiseSVN as the client. I've just renamed the server from mach1 to mach2 and now can't use SVN because it's looking for the repositories at <a href="http://mach1:81/" rel="nofollow noreferrer">http://mach1:81/</a> instead of the new name <a href="http://mach2:81/" ... | <p>Use the "relocate" option provided by Tortoise SVN. Just right click on the upper-most checked out folder, select relocate, and then enter the new URL.</p>
| <p>First google hit:
svn sw --relocate svn://example1.com:22/name <a href="http://example2.com:24/edc" rel="nofollow noreferrer">http://example2.com:24/edc</a></p>
| 9,500 |
<p>After I was convinced that labeled breaks/continues are a total "nono" over <a href="https://stackoverflow.com/questions/15481/java-coding-standard-best-practices-labeled-brakecontinue#15501">here</a>, I need help to remove the label out of my code.</p>
<p>I have a square matrix and a vector that has the same lengt... | <p>Looking at the solutions presented so far:</p>
<ul>
<li><p>They all look less readable than the original, in that they involve spending more code on the mechanism of the code rather than on the algorithm itself</p></li>
<li><p>Some of them are broken, or were before they were edited. Most damning is the fact that p... | <p>Does this work for you? I extracted the inner loop into a method CheckedEntireMatrix (you can name it better than me) - Also my java is a bit rusty.. but I think it gets the message across</p>
<pre><code>for( int idx = 0; idx < vectorLength; idx++) {
if( conditionAtVectorPosition( v, idx )
|| !CheckedEn... | 3,666 |
<p>Does anyone have, or know of, a binary patch generation algorithm implementation in C#?</p>
<p>Basically, compare two files (designated <em>old</em> and <em>new</em>), and produce a patch file that can be used to upgrade the <em>old</em> file to have the same contents as the <em>new</em> file.</p>
<p>The implement... | <p>Sorry I couldn't be more help. I would definately keep looking at xdelta because I have used it a number of times to produce quality diffs on 600MB+ ISO files we have generated for distributing our products and it performs very well.</p>
| <p>This is a rough guideline, but the following is for the rsync algorithm which can be used to create your binary patches.</p>
<p><a href="http://rsync.samba.org/tech_report/tech_report.html" rel="nofollow noreferrer">http://rsync.samba.org/tech_report/tech_report.html</a></p>
| 2,766 |
<p>I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it.</p>
<p>Well there's just the one problem: logistics. Upload speeds are slow and photos fr... | <p>The most common solution for this is a java applet, although most of them are not free. Examples:</p>
<ul>
<li><a href="http://www.jumploader.com/" rel="nofollow noreferrer">http://www.jumploader.com/</a></li>
<li><a href="http://www.aurigma.com/Products/ImageUploader/OnlineDemo.aspx" rel="nofollow noreferrer">http... | <p>GIMP (<a href="http://www.gimp.org/" rel="nofollow noreferrer">http://www.gimp.org/</a>) is a good tool for doing resize and is open source.</p>
| 9,996 |
<p>I have an array in Perl:</p>
<pre><code>my @my_array = ("one","two","three","two","three");
</code></pre>
<p>How do I remove the duplicates from the array?</p>
| <p>You can do something like this as demonstrated in <a href="http://perldoc.perl.org/perlfaq4.html#How-can-I-remove-duplicate-elements-from-a-list-or-array%3f" rel="noreferrer">perlfaq4</a>:</p>
<pre><code>sub uniq {
my %seen;
grep !$seen{$_}++, @_;
}
my @array = qw(one two three two three);
my @filtered = u... | <p>Try this, seems the uniq function needs a sorted list to work properly.</p>
<pre><code>use strict;
# Helper function to remove duplicates in a list.
sub uniq {
my %seen;
grep !$seen{$_}++, @_;
}
my @teststrings = ("one", "two", "three", "one");
my @filtered = uniq @teststrings;
print "uniq: @filtered\n";
my ... | 2,920 |
<p>Our site has the default Stack Exchange logo (text balloon with text 3D), is it possible to change this logo?</p>
<p>I was thinking of something like this:</p>
<p><a href="https://i.stack.imgur.com/n4VXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n4VXE.png" alt="enter image description here" ... | <p>Yes, we can! Or at least discuss if we like a different logo.</p>
<p>From <a href="https://meta.stackexchange.com/a/298341/">this answer</a> on Meta Stack Exchange question "<a href="https://meta.stackexchange.com/questions/298338/whats-the-process-to-change-a-site-logo">What's the process to change a site logo... | <p>i'd like to remind my old suggestion :)</p>
<p><a href="https://i.stack.imgur.com/oVISY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oVISY.png" alt="enter image description here" /></a></p>
<p>here is the original post
<a href="https://3dprinting.meta.stackexchange.com/a/248/1211">https://3dpri... | 80 |
<p>Suppose I have the following C code.</p>
<pre><code>unsigned int u = 1234;
int i = -5678;
unsigned int result = u + i;
</code></pre>
<p>What implicit conversions are going on here, and is this code safe for all values of <code>u</code> and <code>i</code>? (Safe, in the sense that even though <em>result</em> in th... | <p><strong>Short Answer</strong></p>
<p>Your <code>i</code> will be <em>converted</em> to an unsigned integer by adding <code>UINT_MAX + 1</code>, then the addition will be carried out with the unsigned values, resulting in a large <code>result</code> (depending on the values of <code>u</code> and <code>i</code>).</p>... | <p><strong>Horrible Answers Galore</strong></p>
<p><em>Ozgur Ozcitak</em></p>
<blockquote>
<p>When you cast from signed to unsigned
(and vice versa) the internal
representation of the number does not
change. What changes is how the
compiler interprets the sign bit.</p>
</blockquote>
<p>This is completely w... | 7,342 |
<p>Anyone have any good urls for templates or diagram examples in Visio 2007 to be used in software architecture?</p>
| <p><a href="http://softwarestencils.com/uml/index.html" rel="noreferrer">Here is a link</a> to a Visio Stencil and Template for UML 2.0.</p>
| <p>There should be templates already included in Visio 2007 for software architecture but you might want to check out <a href="http://office.microsoft.com/en-us/templates/CT102115841033.aspx" rel="nofollow noreferrer">Visio 2007 templates</a>.</p>
| 4,055 |
<p>I am having trouble printing a hollow object using Slic3r. On flat slopes on top, there are gaps that I cannot get fixed. The perimeters of successive layers just don't cover each other.</p>
<p>Cura however adds filament to cover the gaps.</p>
<p>The bottom left bunny is sliced with Slic3r 1.2.9.99.
The top right ... | <p>This seems to be a recurring problem with Slic3r.</p>
<p>Slic3r appears to have problems with perimeters that are not attached to infill. I suspect that it is getting confused on what is the inside and what is the outside. I know that seems a bit silly; but as you slice an object with indentations (like the bunny... | <p>What infill are you using? How flexible do you need the object to be?</p>
<p>I suggest two or three top and bottom layers, and a second or third solid perimeter as well.</p>
<p>The slicer has to determine if a particular path is part of an external perimeter or a top layer, so adding one to each should give a bett... | 608 |
<p>I got a webserver with a running application. There's a webpage with a form: some text data and a file upload field. Now, what I would like to have is it working like this:<br>
The file is sent to the dedicated server, diffrent then the one application is running on. The server should return some kind of path (or an... | <p>POST to dedicated server, server stores image and calls back to web server through a web service or other to give it any info required.</p>
| <p>POST to dedicated server, server stores image and calls back to web server through a web service or other to give it any info required.</p>
| 8,870 |
<p>I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the <strong>id</strong>). What is the simplest way to accomplish this?</p>
<p>I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there ... | <p>To get a copy, use the <a href="https://api.rubyonrails.org/classes/ActiveRecord/Core.html#method-i-dup" rel="noreferrer">dup</a> (or clone for < rails 3.1+) method:</p>
<pre><code>#rails >= 3.1
new_record = old_record.dup
# rails < 3.1
new_record = old_record.clone
</code></pre>
<p>Then you can change whi... | <p>You can also check the <a href="https://github.com/esbanarango/acts_as_inheritable" rel="nofollow">acts_as_inheritable</a> gem.</p>
<p>"Acts As Inheritable is a Ruby Gem specifically written for Rails/ActiveRecord models. It is meant to be used with the <a href="https://github.com/esbanarango/acts_as_inheritable#se... | 8,482 |
<p>How do I <code>grep</code> and show the preceding and following 5 lines surrounding each matched line?</p>
| <p>For <strong>BSD</strong> or <strong>GNU</strong> <code>grep</code> you can use <code>-B num</code> to set how many lines before the match and <code>-A num</code> for the number of lines after the match.</p>
<pre><code>grep -B 3 -A 2 foo README.txt
</code></pre>
<p>If you want the same number of lines before and af... | <pre><code>$ grep thestring thefile -5
</code></pre>
<p><code>-5</code> gets you <code>5</code> lines above and below the match 'thestring' is equivalent to <code>-C 5</code> or <code>-A 5 -B 5</code>.</p>
| 3,055 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.