instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>What's the best lifetime model for a <code>DataContext</code>? Should I just create a new one whenever I need it (aka, function level), should I keep one available in each class that would use it (class level), or should I create a static class with a static DataContext (app-domain level)? Are there any considered b... | <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,342 |
<p>I know that it does in PHP, and I'm pretty sure it does in Java. I haven't used the latest versions of .NET, so I won't speak for them. It seems very awkward, but I was wondering if there was an underlying reason for this.</p>
| <p>One reason is compatibility - anyone who has done 'check for existence' knows to exclude directories; changing that behaviour may confuse those who rely on that behaviour.</p>
<p>Secondly, the underlying code often does a check on the operating system for existence in a catlog of filesystem entries - to the OS, a d... | <p>Part of the Unix philosophy is that "<a href="http://www.cs.bgu.ac.il/~arik/usail/concepts/filesystems/everything-is-a-file.html" rel="nofollow">everything is a file</a>". This has influenced other environments as well to some degree.</p>
| 7,282 |
<p>I've heard a bit about folks using air compressors with tubing to the toolhead and outlet openings there as part cooling. One example is the <a href="https://the-makerhive.myshopify.com/products/berd-air-max" rel="nofollow noreferrer">Berd Air</a>, but from the information I can gather, it works with rather low pres... | <p>I'm an owner of both an FDM printer and a resin one:</p>
<p>I've long searched a resin capable of printing durable objects even in tiny details but with poor luck. I've tried ABS-Like resins, and they provide a slightly better resistance than regular resin but do not expect great improvements; I've tryed the siraya... | <p>I'm an owner of both an FDM printer and a resin one:</p>
<p>I've long searched a resin capable of printing durable objects even in tiny details but with poor luck. I've tried ABS-Like resins, and they provide a slightly better resistance than regular resin but do not expect great improvements; I've tryed the siraya... | 2,014 |
<p>How would I go about generating a list of all possible permutations of a string between x and y characters in length, containing a variable list of characters.</p>
<p>Any language would work, but it should be portable.</p>
| <p>There are several ways to do this. Common methods use recursion, memoization, or dynamic programming. The basic idea is that you produce a list of all strings of length 1, then in each iteration, for all strings produced in the last iteration, add that string concatenated with each character in the string individual... | <p>The possible string permutations can be computed using recursive function. Below is one of the possible solution.</p>
<pre><code>public static String insertCharAt(String s, int index, char c) {
StringBuffer sb = new StringBuffer(s);
StringBuffer sbb = sb.insert(index, c);
return sbb.toString... | 2,285 |
<p>Most XML parsers will give up after the first error in a document. In fact, IIRC, that's actually part of the 'official' spec for parsers. </p>
<p>I'm looking for something that will break that rule. It should take a given schema (assuming a valid schema) and an xml input and attempt to keep going after the firs... | <p>In a different question on SO (<a href="https://stackoverflow.com/questions/41908/customizing-visual-studio">link</a>), someone mentioned the VS 2005 / VS 2008 add-in "RockScroll". It seems to provide the "error bar" feature I was inquiring about in my question above.</p>
<p><a href="http://www.hanselman.com/blog/... | <p>The "error bar" functionality is provided in JetBrains ReSharper. I'm not sure if it does highlighting of references to the currently selected identifier.</p>
| 5,244 |
<p>I'm in the middle of building a D-Bot printer, and have run into a bit of an issue when it comes to the heat bed wires. The heated bed is an aluminum plate with a silicon heater attached to it, and the heater wires are not long enough to make it through the drag chain when the Z-axis is fully extended.</p>
<p>The ... | <p>750 W at 120 V is 6.3 A. 22-24 AWG is on the thin side for this. I would recommend 18 AWG or thicker. You don't need a specific style of insulation for this (other than something that is rated for the voltage and temperature the wire will need to withstand, but most commonly found wire should be good).</p>
<p>A goo... | <p>750 W at 120 V is around 6.3 A.</p>
<p>You can use a <a href="https://www.calculator.net/voltage-drop-calculator.html" rel="nofollow noreferrer">voltage drop calculator</a> to find out how much power is lost in the wires, and therefore their temperature increase.</p>
<p>I did it for you. With 10 feet (2x5 feet) 20A... | 1,685 |
<p>I'm making a hybrid 3D printer and circuit etching (CNC milling) machine that can both 3D print and etch prototype circuit boards. I'll be using Marlin firmware with an Arduino Mega & RepRap 1.4 board. It will have a 3D printer head and a milling head side by side. I'd like to have it be able to read both .gbr (... | <p>You can use both .gcode and .gbr files one one machine. We do it where I work.</p>
<p>However, when we make prototype circuit boards, we don't print them; we acquire circuit board blanks, and then we either:</p>
<ol>
<li><p>Use a diode laser to burn off the top layer of garolite for isolation traces, then do a che... | <p>Well, I'm Using pronterface to send the gcode to print the traces of my PCB with an ink pen (sharpie); since the parameter in the Marlin-Rep rap1.4 is configured to fast print, So I can easily send the code just setting the origin or Zero to print on any area of the printer. </p>
<p>To set the new Zero just use the... | 1,413 |
<p>The .NET Setup project seems to have a lot of options, but I don't see an "Uninstall" option. </p>
<p>I'd prefer if people could "uninstall" from the standard "start menu" folder rather than send them to the control panel to uninstall my app, so can someone please tell me how to do this?</p>
<p>Also, I am aware o... | <p>You can make shortcut to:</p>
<pre><code>msiexec /uninstall [path to msi or product code]
</code></pre>
| <p>Visual Studio 2013 allows you to create an Uninstall shortcut in the shortcut design page if you use the Installshield Add-on.</p>
| 8,694 |
<p>I am having a frequent problems with my web hosting (its shared)</p>
<p>I am not able to delete or change permission for a particular directory. The response is,</p>
<pre><code>Cannot delete. Directory may not be empty
</code></pre>
<p>I checked the permissions and it looks OK. There are 100's of files in this fo... | <p>You can't <strong>rmdir</strong> a directory with files in it. You must first <strong>rm</strong> all files and subdirectories. Many times, the easiest solution is:</p>
<pre><code>$ rm -rf old_directory
</code></pre>
<p>It's entirely possible that some of the files or subdirectories have permission limitations t... | <p>This could also be because your FTP client might not be showing the hidden files (like cache, or any hiddn files that your application might create), while the hidden files are preventing you from deleting the directory. (though, in your case, I am not sure if this is the cause .. .it could be permission issue with ... | 9,914 |
<p>I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's ... | <p>These work very well for me: <a href="http://unxutils.sourceforge.net/" rel="nofollow noreferrer">http://unxutils.sourceforge.net/</a>.</p>
<p>Cygwin is not so good on Vista or 64 bit, so I stopped using it a while back.</p>
| <p><a href="https://stackoverflow.com/questions/32777/what-is-the-best-and-most-complete-implementation-of-unix-system-commands#32792">Why vote down this question</a>? It's obviously meant to be tongue in cheek is it worth the voter and the receiver losing rep over? Can't you people leave anything at zero and mark up... | 5,278 |
<p>What is the simplest way to install memcached on CentOS for someone new to the world of Linux? What is the best way to enable it for Apache and PHP</p>
| <p>Unless Apache and PHP have some option to utilize memcached for internal workings (of which I am unaware of), you typically don't "enable" it for such apps. Instead, you would get a <a href="http://www.danga.com/memcached/apis.bml" rel="nofollow noreferrer">client library</a> to use memcached from within your appli... | <p>The easiest way is to find a reilable source of the RPM's needed to install memcached and memcached for PHP. There is a blog post which addresses this concern:</p>
<p><a href="http://blog.gahooa.com/2009/02/08/update-on-fedora-vs-redhat-enterprise-linux/" rel="nofollow noreferrer">http://blog.gahooa.com/2009/02/08... | 4,358 |
<p>How do I make a tree data structure in C++ that uses iterators instead of pointers? I couldn't find anything in the STL that can do this. What I would like to do is to be able to create and manipulate trees like this:</p>
<pre><code>#include <iostream>
#include <tree>
using namespace std;
int main()
... | <p>Here is <a href="http://www.aei.mpg.de/~peekas/tree/" rel="noreferrer">tree.hh</a> which is a bit close to what you want to do, though a bit
different.</p>
<p>Here is a piece of code extracted from its website.</p>
<pre><code>int main(int, char **)
{
tree<string> tr;
tree<string>::iterator to... | <p>Why would you want to do that? If this is for learning purposes then you can write your own tree data structure. If this is for gaining the benefit of a data-structure holding arbitrary index types, optimized for searching and good at insertion then consider using a map.</p>
<p>A map is an associative container t... | 3,967 |
<p>I was looking at purchasing the Creality CR-X or another similar dual extruder (note, NOT dual nozzle) printer. I know it was designed to print two colors of the same filament, but is it able to print two different filaments?</p>
<p>I would be printing HIPS with ABS or PVA with PLA, so the two filaments would have v... | <p>I believe the problem is not so much that the filament is sticking to the nozzle; it's that the filament is not sticking to the bed.</p>
<p>You've confirmed that you have correct clearance for the nozzle to bed distance. The next considerations are bed temperature and nozzle temperature. New brands often require new... | <p>I believe the problem is not so much that the filament is sticking to the nozzle; it's that the filament is not sticking to the bed.</p>
<p>You've confirmed that you have correct clearance for the nozzle to bed distance. The next considerations are bed temperature and nozzle temperature. New brands often require new... | 1,792 |
<p>On my <a href="http://rads.stackoverflow.com/amzn/click/B007KG0ZYI" rel="nofollow">Switching Power Supply</a> there is a little orange trimpot that's marked <code>VR1</code>; what does that do, and does it work similar to the ones on the stepper drivers?</p>
| <p>No doubt it's just a final tuning potentiometer. Even on the pictures you linked it's described as V adj which stands for voltage adjustment.
It's a way to tune your power supply's output as it can vary depending on temperature/humidity/wall-plug voltage/etc.</p>
<p>It's usually set properly and doesn't need to be ... | <p>Vr usually stands for variable resistor, basically a pot. Usually by adjusting this you would adjust the voltage output on most power supplies, ensure you double check your voltage output with a meter after adjusting.</p>
| 261 |
<p>I literally just started OpenSCAD today, so please take it easy on me, but is shell scripting possible with OpenSCAD? as in, to write a script in the OpenSCAD syntax, and have it output images, or animations? with or without having to render the image.</p>
<p>I've been reading the man pages, and I'm not sure if that... | <p>The horizontal bands are 5mm apart, which is a common pitch for the screws often used for the Z axis.</p>
<p>I would look for something that binds, moves, slips, or touches once per screw revolution. The movement repeats along the screw, so if it is a screw defect I would look for a scratch or bump that affects the... | <p>Try setting the z-seam to <em>random</em> in your slicer. In Slic3r it is <em>Seam position</em> under <em>Advanced</em> near the bottom of the <em>Layer and perimeters</em> page of the <em>Print Settings</em>.</p>
| 2,069 |
<p>So our web server apps need to connect to the database, and some other apps have startup scripts that execute at boot time.</p>
<p>What's the best way to store the name/password for these applications, in terms of</p>
<ul>
<li>security, e.g. perhaps we don't want sysadmins to know the database password</li>
<li>ma... | <p>The best way to secure your password is to stop using one. Use a trusted connection:
<a href="http://msdn.microsoft.com/en-us/library/ms998292.aspx" rel="nofollow noreferrer">How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0</a>.
Then you have nothing to hide - publish your web.config and so... | <p>You can bake a symmetric encryption key into your binary, and have that binary read an encrypted username/password from a file on disk when it starts up. </p>
<p>However, this is not really much more than obfuscation, since your code is likely to be stored in some source repository somewhere. </p>
<p>I would sug... | 3,191 |
<p>How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows:</p>
<ul>
<li>Users submit content</li>
<li>Other users view and vote on the... | <p>You could use something similar to the <a href="http://redflavor.com/reddit.cf.algorithm.png" rel="noreferrer">Reddit algorithm</a> - the basic principle of which is you compute a value for a post based on the time it was posted and the score. What's neat about the Reddit algorithm is that you only need recompute th... | <p>I developed an social bookmarking site, <a href="http://www.sites-favoritos.com" rel="nofollow noreferrer">Sites Favoritos</a>, and used a complex algoritm:</p>
<ol>
<li>First, the votes are finite, an user only have a limited number of votes, and the number of votes depends on the user points. To earn points each ... | 9,747 |
<p><strong>Before the question, here is my setup;</strong> </p>
<ul>
<li>Prusa i3 (with mainboard Mks Gen v1.2)</li>
<li>Repetier as slicer</li>
<li>Marlin source code </li>
</ul>
<p>My main task is to convert my 3D printer into a chocolate printer.
I have replaced the filament extruder with a chocolate extruder. An... | <p>The Y-Max setting does not help, because it is the software end stop for the other end of the axis.</p>
<p>The Y Home position also doesn't help as it only changes the coordinate that the printer assumes for when it hits the home position. That is used for printers (like deltas) that home to the max end switches.<... | <p>Now I've finally had time to look into this, since I knew it somehow existed, but wasn't sure how it worked:</p>
<p>Use the M206 G-code command in Marlin, Sprinter, Smoothie, or RepRap Firmware to offset the 0,0,0 coordinate of your printbed relative to the endstops.</p>
<p>The reprap.org wiki page says:</p>
<blo... | 336 |
<p>I'm trying to print a calibration cube from PLA using a 70 °C heated build platform on a Prusa i3 Pro W. This results in:</p>
<p><a href="https://i.stack.imgur.com/G00Um.jpg)" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G00Um.jpg)" alt="Calibration cube print failed"></a></p>
<p>Please e... | <p>There are multiple issues that cause this result.</p>
<p>First, your nozzle is to far from the bed. This can be seen by the curly deposited filament on the build plate (I guess that is the brim or the skirt). Please properly level the bed and position the nozzle at a distance of a plain A4 paper as best as possible... | <p>The layer shift can also be caused by the stepper motor "skipping" when it hits an obstruction. The obstruction can be a loop or ridge of filament sticking up higher than it should be.</p>
<p>As Oscar suggests, the first step is always to make the first-layer-thickness be right. This is often called "bed leveling... | 1,252 |
<p>I came across a new Steel infused PLA from <a href="https://colorfabb.com/steelfill" rel="nofollow noreferrer">Colorfabb</a>. On the store page someone had asked, what happens if it was exposed to water, would it rust. I am actually, not sure what would happen. I am interested what the effects of leaving in the elem... | <p>The main issue here (the gaps between layers) was solved by reducing combing.</p>
<p>Combing was enabled without a limit on the range so a max combing distance of 10 mm was introduced. This prevented too much filament from oozing out during travels.</p>
<p>The oozing filament was causing nothing to come out o... | <p>These lines could be caused by a mechanical issue with the printer; it looks as if the positioning is not up to par. </p>
<p>This can be related to loose belts of the X-axis and Y-axis, or play in your system, e.g. look at the rollers of the carriage.</p>
<hr>
<p><em>I've experienced an issue with play between th... | 1,431 |
<p>I have a Prusa i3 (from FLSun). I have assembled the printer, calibrated it (fairly decently), and have successfully demonstrated extrusion manually. However, when I try to run a print job (the G-code clearly contains E commands), the extruder motor never rotates. Is this a common problem? Any suggestsions for how t... | <p>According to all the information:</p>
<ul>
<li>No reassignment of the extruder in the Gcode</li>
<li>You can extrude if you push the filament by hand</li>
<li>Extruder motor works when switched to Z driver</li>
<li>Z Motor works</li>
</ul>
<p>I come to the conclusion that some of your electronics or the motor have... | <p>This should have been a comment: when you say "manual extrusion", do you mean moving filament by hand or using extruder position commands from printer menu? Is extruder motor working at all? You can for example plug it instead of a Z-motor to check.</p>
<p>Suggested points to check:</p>
<ul>
<li>Motor wire connect... | 729 |
<p>I've been wrestling with a filament grinding problem for a few weeks now and I'm stuck.</p>
<p>The problem manifests itself as starting a print alright then extrusion stops while the printer keeps moving. When I pull the filament out I see indents from the gear then a depression where it ground down the filament.</p... | <p>Thingieverse does respect the orientation an item was designed in, just like most slicers will. Designers will often choose any one of the three planes (XY, YZ, ZX) as their first by preference, then work out the other parts in relation to the first. This does often not take into account the actual print orientation... | <p>When I design parts in CAD software I pick a starting plane and go from there. And that starting plane doesn't correspond to how the part is designed to be printed. That usually comes later.</p>
| 1,725 |
<p>I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like </p>
<pre><code><img src="example.jpg"
alt="example">
</code></pre>
<p>If worse comes to worst, I could possibly preprocess the page... | <p>This is one of my pet peeves: <em>never</em> parse HTML by hand. <em>Never</em> parse HTML with regexps. <em>Never</em> parse HTML with string comparisons. <em>Always</em> use an HTML parser to parse HTML – that's what they're there for.</p>
<p>It's been a long time since I've done any PHP, but a quick search turne... | <p>Why don't you read in a line, and set it to a string, then check the string for tag openings and closings, If a tag spans more then one line add the next line to the string and move the part before the opening brace to your processed string. Then just parse through the entire file doing this. Its not beautiful but i... | 5,391 |
<p>I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement outside of the rectangle of the control.</p>
<p>I ... | <p>Yeah, it is messy, I can't think of a way to avoid it though.<br>
You could hide some of the messiness from the client by putting the temporary table creation in a stored procedure (and using "execute immediate" to create they table)<br>
One thing you will need to watch out for is left over temporary tables (should ... | <p>Do you have a specific scenario in mind?
For example, if the LOB holds files, and you are on a company intranet, perhaps you can write a stored procedure to extract the files to a known directory on the network and access them from there.</p>
| 5,902 |
<p>When I print with PLA, I get a perfect first layer.</p>
<p>However, when I print with PETG, the first layer looks like this:</p>
<p><a href="https://i.stack.imgur.com/pceRa.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/pceRa.jpg" alt="enter image description here"></a></p>
<p>I've read all the info th... | <blockquote>
<p>One thought I had, does PETG need a different clearance between the nozzle and the bed than PLA?</p>
</blockquote>
<p>Short answer: "Yes, for some it does".</p>
<hr>
<p>The results from your image are typically seen when the initial layer height for PETG is too small. PETG likes an additional gap o... | <p>When I print with PETG, my bed is 80 °C for first 2 layers then I drop it to 65 °C</p>
<p>Extruder temp first two layers 240-250 °C and then drop to 225-230 °C.</p>
| 1,486 |
<p>My website will be using only OpenID for authentication. I'd like to pull user details down via attribute exchange, but attribute exchange seems to have caused a lot of grief for StackOverflow.</p>
<p>What is the current state of play in the industry? Does any OpenID provider do a decent job of attribute exchange... | <p>Here on Stack Overflow, we're just using the <a href="http://openid.net/specs/openid-simple-registration-extension-1_0.html" rel="noreferrer">Simple Registration</a> extension for now, as there were some issues with Attribute Exchange (AX).</p>
<p>The biggest was OpenID Providers (OP) not agreeing on which <a href=... | <p>While Attribute Exchange has it's problems (I'm sure someone from SO can tell you more), it does have <a href="http://blogs.gnome.org/jamesh/2007/11/26/openid-ax/" rel="nofollow noreferrer">a lot of benefits</a>. To some extent it depends on whether you really need it or not. Simple Registration seems to do that job... | 3,301 |
<p>I'm running WAMP v2.0 on WindowsXP and I've got a bunch of virtual hosts setup in the http-vhosts.conf file.</p>
<p>This was working, but in the last week whenever I try & start WAMP I get this error in the event logs:</p>
<blockquote>
<p>VirtualHost *:80 -- mixing * ports and
non-* ports with a NameVirtua... | <blockquote>
<p>NameVirtualHost *:80</p>
<p>I get this error:</p>
<p>Only one usage of each socket address (protocol/network address/port) is normally >permitted. : make_sock: could not bind to address 0.0.0.0:80</p>
</blockquote>
<p>I think this might be because you have somthing else listening to port 80... | <p>Well, it seems the problem there is the way (and order) in which you assign the ports. </p>
<p>Basically, *:80 means "use port 80 for all hosts in this configuration". When you do this, Apache tries to bind that host to 0.0.0.0:80, which means that host will receive every single packet coming to the machine through... | 6,003 |
<p>I want to build my own custom log4j (network) adapter to solve my problem <a href="https://stackoverflow.com/questions/29505/deserialize-in-a-different-language">that I posted here.</a></p>
<p>I have looked at the documentation on the log4j and I cant see where/if the developers go into how to do this.</p>
<p>Can ... | <p><a href="http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-toolbox.html" rel="nofollow noreferrer">Write custom appenders for log4j</a></p>
| <p>May I suggest that you leverage the existing SyslogAppender?</p>
| 6,933 |
<p>Recently my RAMPS power connector caught fire while heating the heated bed. I suspect this was a defect caused by the connector, and de-soldered/removed it as best I could. I'm not an electrical engineer, so I'm looking for advice on whether It is possible to re-solder the power connectors directly onto the board, ... | <p>The blue clips stick in the connector on the extruder end of the feed tube. They are to keep it from opening as the printer extrudes and retracts filament.</p>
<p>To install them, push them in between the white part of the fitting on the feed tube (not the hot end). You should only need one or two, and they are all... | <p>The clips or collet clips as they are called are to secure the Bowden tube more solidly to improve printer extrusion; more specifically: extruder retraction performance.</p>
<p>E3D has explained this very nicely on their site under <a href="https://e3d-online.com/blog/2017/10/27/bowden-tube-physics/" rel="nofollow ... | 1,625 |
<p>I've had my Ender 3 for almost three weeks, gone through about a kilogram of PLA filament (printing a mix of upgrade parts for the Ender 3 and stuff I actually want to use) and made one PETG object, generally with good results.</p>
<p>I've noticed however, as seems relatively common (per YouTubers, anyway), that my ... | <p>I may be biased as my question/answer is the one I believe you're asking this question in reference to, but I would say that yes, it not only competes but is a far better solution. "Auto-leveling" systems <strong>do not level</strong> your bed. They just partially compensate for poor adhesion by adjusting ... | <p>So, the difference between the shimming vs. auto-leveling is that auto-leveling goes around in a 4x4 grid taking measurements of the bed (you do need to set the Z calibration first, as you know) vs. the shimming method where you go to 4 corners on your build plate where you stick a piece of paper or something under ... | 1,947 |
<p>I using SharePoint Designer to create a workflow. I'm trying to get at a sub-folder in a document library in the "Define Workflow Lookup" dialog. There are two issues with this:</p>
<ol>
<li>I can't look up items by URL Path. If I look up by Title, I can
output the URL Path, but selecting by path doesn't work. Wh... | <p>I really don't have much experience with Sharepoint, but I thought I could at least provide <em>some</em> answer - even if it's the wrong one.</p>
<p>From another dev I've spoken to it sounds like it's tough to get into any subfolders, so you might need to look at making your own custom workflow.</p>
<p>Maybe some... | <p>The issue is that "folders" are not really folders as they are accessed by querystring, not a "/" as with real folders.</p>
| 5,340 |
<p>I have just started working with the <code>AnimationExtender</code>. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. The postback ho... | <p>The flow you are seeing is something like this:</p>
<ol>
<li>Click on button</li>
<li>AnimationExtender catches action and call clickOn callback</li>
<li>linkPostback starts asynchronous request for page and then returns flow to AnimationExtender</li>
<li>Animation begins</li>
<li>pageRequest returns and calls play... | <p>With help from the answer given the final solution was as follows:</p>
<p>Add another button and hide it.</p>
<pre><code><input id="btnHdn" runat="server" type="button" value="button" style="display:none;" />
</code></pre>
<p>Point the AnimationExtender to the hidden button so the firing of the unwanted cli... | 7,198 |
<pre><code>Nozzle diameter = .4
Extrusion multiplier = 1
Extrusion Width = .45 <-- I feel like this could be reduced to fix it?
Layer Height = .3
</code></pre>
<p>I'm using Simplify3D.</p>
<p><a href="https://i.stack.imgur.com/SsiMS.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/SsiMS.jpg" alt="ente... | <p>If it's on each corner, and not the layer change corner, it's a combination of overshoot and the short "pause" of the printer when it changes direction. </p>
<p>You can minimize it, but it won't go away 100% (due to overshoot from direction changes), usually models with a slight rounded corners work great. If yo... | <p>Your printer is over extruding.</p>
<p>It looks like PLA on the photo, the preset multiplier in S3D is 0.90 (not 1.0!)</p>
<p>The nozzle diameter should be the same as the extrusion width (both 0.40).</p>
<p>When you set the width to auto you get a bigger width. I don't really know why, but it was told me so.</p>... | 473 |
<p>How would you write (in C/C++) a macro which tests if an integer type (given as a parameter) is signed or unsigned?</p>
<pre>
#define is_this_type_signed (my_type) ...
</pre>
| <p>If what you want is a simple macro, this should do the trick:</p>
<pre><code>#define is_type_signed(my_type) (((my_type)-1) < 0)
</code></pre>
| <p>You could do this better with a template function, less macro nasty business.</p>
<pre><code> template <typename T>
bool IsSignedType()
{
// A lot of assumptions on T here
T instanceAsOne = 1;
if (-instanceAsOne > 0)
{
return tr... | 9,051 |
<p>I've been working on my own DIY 3-D printer recently, and I've been trying to experiment a little with different materials for the body. Someone suggested using HDPE (high-density polyethylene), since it works well on a CNC machine, which would make creating a number of prototypes easy. I know HDPE can also be used ... | <p>I've used what is commonly described as UHMW-PE, aka, Ultra-high Molecular Weight Polyethylene for various projects. You may know this material is often used in cutting boards, as it cleans easily and doesn't cut easily.</p>
<p>it does machine in a manner similar to aluminum, although the tool should be cooled/lubr... | <p>I've tried this material (8 mm thickness) for a Prusa i3 clone of my own design but needed to abandon using it as it doesn't allow to be cut by laser easily on my friends laser cutting machine (not a hobby laser cutting machine, it is his business). </p>
<p>HDPE requires lower speed than cutting Plexiglas or Acryli... | 303 |
<p>How do I list the symbols being exported from a .so file? If possible, I'd also like to know their source (e.g. if they are pulled in from a static library).</p>
<p>I'm using gcc 4.0.2, if that makes a difference.</p>
| <p>The standard tool for listing symbols is <code>nm</code>, you can use it simply like this:</p>
<pre><code>nm -gD yourLib.so
</code></pre>
<p>If you want to see symbols of a C++ library, add the "-C" option which demangle the symbols (it's far more readable demangled).</p>
<pre><code>nm -gDC yourLib.so
</code></pr... | <p>If you just want to know if there are symbols <em>present</em> you can use</p>
<pre><code>objdump -h /path/to/object
</code></pre>
<p>or to list the debug info</p>
<pre><code>objdump -g /path/to/object
</code></pre>
| 5,510 |
<p>I like Tinkercad so far for it's very simple UI. (I'm new to 3D modeling and very confused by Blender and the like.) However, I'm not using it to do 3D printing just yet. For I'd like to be able to be to slap textures on the models I make and get images of that. What is the easiest beginner way to do that (for Linux... | <p>For your purposes, consider that Meshmixer (free) can open .OBJ files and display them in any position you desire.</p>
<p>I use Meshmixer quite a bit for model editing, but have not used it for .OBJ files with textures. I searched my drive and found quite a few .OBJ files, but was not able to present or add texture... | <p>Consider using Clara.io (100% free):</p>
<ul>
<li>Export your Tinkercad project as OBJ.</li>
<li>Import in Clara.io</li>
<li>Texture and render.</li>
</ul>
<p>Clara.io is 100% web based. It is simple to learn if you have prior experience with other 3D renderers. If you don't, the learning curve might be steep thou... | 1,113 |
<p>I'm trying to print large objects (around 1 meter squared) with polycarbonate pellets. The problem is sometimes the print cracks. It is not due to delamination as it is a shear crack across multiple layers. I know the ideal scenario is to have a heated enclosure but I cannot do that due to the size. Any suggestions?... | <p>Printing polycarbonate requires a high end 3D printer that is suitable for the task.</p>
<p>From <a href="https://www.simplify3d.com/support/materials-guide/polycarbonate/" rel="nofollow noreferrer">Simplify3d support</a> we learn that:</p>
<blockquote>
<p>... requires very high temperatures for printing and will <s... | <p>Sounds like your problem is cooling, which would be mitigated by an enclosure to eliminate draughts and hold a higher air temperature.</p>
<p>I made an enclosure using parts-on-hand and some printed PLA joiners. It doesn't have to be fancy or expensive to work well.</p>
<p>Details are at <a href="https://3dprinting... | 2,057 |
<p>What is the best way people have found to do String to Lower case / Upper case in C++?</p>
<p>The issue is complicated by the fact that C++ isn't an English only programming language. Is there a good multilingual method?</p>
| <pre><code>#include <algorithm>
std::string data = "Abc";
std::transform(data.begin(), data.end(), data.begin(), ::toupper);
</code></pre>
<p><a href="http://notfaq.wordpress.com/2007/08/04/cc-convert-string-to-upperlower-case/" rel="noreferrer">http://notfaq.wordpress.com/2007/08/04/cc-convert-string-to-upperlo... | <p>What Steve says is right, but I guess that if your code had to support several languages, you could have a factory method that encapsulates a set of methods that do the relevant toUpper or toLower based on that language.</p>
| 3,259 |
<p>Currently we have a project with a standard subversion repository layout of:</p>
<p>./trunk<br>
./branches<br>
./tags</p>
<p>However, as we're moving down the road of OSGi and a modular project, we've ended up with:</p>
<p>./trunk/bundle/main<br>
./trunk/bundle/modulea<br>
./trunk/bundle/moduleb
./tags/bundle/mai... | <p>The Subversion book contains two sections on this:</p>
<ul>
<li><a href="http://svnbook.red-bean.com/en/1.4/svn.branchmerge.maint.html#svn.branchmerge.maint.layout" rel="nofollow noreferrer">Repository Layout</a></li>
<li><a href="http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html#svn.reposadmin.projec... | <p>I've answered a similar question in a StackOverflow <a href="https://stackoverflow.com/questions/16829/structure-of-projects-in-version-control#16915">Version Control Structure question</a>. It actually fits even better here since we do heavy OSGi development and have lots of bundles. I must echo Anders Sandvig comm... | 3,519 |
<p>Assume that I have programs <code>P0</code>, <code>P1</code>, ...<code>P(n-1)</code> for some <code>n > 0</code>. How can I easily redirect the output of program <code>Pi</code> to program <code>P(i+1 mod n)</code> for all <code>i</code> (<code>0 <= i < n</code>)?</p>
<p>For example, let's say I have a pro... | <p>After spending quite some time yesterday trying to redirect <code>stdout</code> to <code>stdin</code>, I ended up with the following method. It isn't really nice, but I think I prefer it over the named pipe/fifo solution.</p>
<pre><code>read | { P0 | ... | P(n-1); } >/dev/fd/0
</code></pre>
<p>The <code>{ ... }... | <p>I doubt sh/bash can do it.
ZSH would be a better bet, with its MULTIOS and coproc features.</p>
| 6,146 |
<p>Inside an asp.net page, should I use</p>
<pre><code><html><title>My page's title from México</title></html>
</code></pre>
<p>Or </p>
<pre><code><html><title>My page&rsquo;s title from M&eacute;xico</title></html>
</code></pre>
<p>Both examples have the same... | <p>I'm having a similar issue. You might be able to do something like this:</p>
<pre><code>SET arithabort arith_overflow off
SET @the_date = CAST(@date_string AS DATETIME)
IF @the_date is NULL
set @the_date = getdate()
SET arithabort arith_overflow on
</code></pre>
<p>However, this doesn't work well in a select.... | <p>Found <a href="http://blog.sqlauthority.com/2007/07/12/sql-server-validate-field-for-date-datatype-using-function-isdate/" rel="nofollow noreferrer">this in the second result</a> in Google when searching for "validate date string sql".</p>
<pre><code>----Invalid date
SELECT ISDATE('30/2/2007')
RETURNS : 0 (Zero)
--... | 3,050 |
<p>Get the following error periodically in an IIS application:</p>
<blockquote>
<p>Failed to load resources from resource file.</p>
</blockquote>
<p>The full error message in the Application Event Log is:</p>
<blockquote>
<p>Event Type: Error<br>
Event Source: .NET Runtime<br>
Event Category: None<br>... | <p>Do you have .NET 1.1 and .NET 2.0 apps running on the web server? We had some instances of a similar nature around here and the resolution we found was to create two app pools, one for 1.1 apps and one for 2.0 apps and to assign each application accordingly.</p>
| <p>Do you get a different error without the ISAPI filter in place?</p>
| 4,569 |
<p>My anet A8 stepper drivers get very hot after some time printing, so I decided to install a 5V fan to cool them down. I had the idea to get a 12V to 5V regulator to connect a 5V fan, but then i found this image:</p>
<p><a href="https://i.stack.imgur.com/Ryeyj.jpg" rel="noreferrer"><img src="https://i.stack.imgur.co... | <p>The 5V is derived from the 12V supply by a linear regulator (L7805CD, DPAK package with 100 C/W thermal resistance). The maximum you can draw from it (without overheating the regulator) is around 200mA. Considering the electronics on the board are already using some power, the maximum would be around a 150mA fan but... | <p>5 V and 3.3 V are both <a href="https://learn.sparkfun.com/tutorials/logic-levels/33-v-cmos-logic-levels" rel="nofollow noreferrer">logic "highs"</a> in computing and measured against GND. If the fan simply has to know the on stance and nothing more, then you could run a fan with the logic 5 V (and probably 3.3 V fo... | 1,379 |
<p>As I started to learn about 3D printing, the gist I learned was "it's better to store the filaments in a drybox." As I rechecked these notes, they were to a good degree from an era when PLA was rather new to the market and ABS was the goTo.</p>
<p>Then I learned "PLA is not really hygroscopic and can ... | <h1><a href="https://ultimaker.com/en/products/materials/pva" rel="nofollow noreferrer">PVA</a></h1>
<p>From experience I can tell that PVA filaments need to be stored with silica beads in a plastic bag or in a specific dry-box. PVA is soluble in water and is very hygroscopic. With moisture it gets soft and swells. My ... | <p>Some brands of PLA+ and colors of filament seem to have issues if left in the open air for too long a period. These then need to be dried back out in a dry box. The filament seems to be softer and the hobb seems to strip it out more easily causing print failures. The colors I have had the most troubles with are t... | 1,046 |
<p>What's the "best" (taking both speed and readability into account) way to determine if a list is empty? Even if the list is of type <code>IEnumerable<T></code> and doesn't have a Count property.</p>
<p>Right now I'm tossing up between this:</p>
<pre><code>if (myList.Count() == 0) { ... }
</code></pre>
<p>an... | <p>You could do this:</p>
<pre><code>public static Boolean IsEmpty<T>(this IEnumerable<T> source)
{
if (source == null)
return true; // or throw an exception
return !source.Any();
}
</code></pre>
<p><strong>Edit</strong>: Note that simply using the .Count method will be fast if the underly... | <p>This extension method works for me:</p>
<pre><code>public static bool IsEmpty<T>(this IEnumerable<T> enumerable)
{
try
{
enumerable.First();
return false;
}
catch (InvalidOperationException)
{
return true;
}
}
</code></pre>
| 6,261 |
<p>Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships.</p>
<p>We then have a separate jvm that is the server using this data. As it is running continuousl... | <p>A Hibernate session loads all data it reads from the DB into what they call the <i>first-level cache</i>. Once a row is loaded from the DB, any subsequent fetches for a row with the same PK will return the data from this cache. Furthermore, Hibernate gaurentees reference equality for objects with the same PK in a si... | <p>The most used practice is to have a <a href="http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html_single/#d0e129" rel="nofollow">Container-Managed Entity Manager</a> so that two or more applications in the same container (ie Glassfish, Tomcat, Websphere) can share the same caches.
But if you don't use... | 7,117 |
<p>Let's say you create a wizard in an HTML form. One button goes back, and one goes forward. Since the <em>back</em> button appears first in the markup when you press <kbd>Enter</kbd>, it will use that button to submit the form.</p>
<p>Example:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-consol... | <p>I'm just doing the trick of <code>float</code>ing the buttons to the right.</p>
<p>This way the <code>Prev</code> button is left of the <code>Next</code> button, but the <code>Next</code> comes first in the HTML structure:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="f... | <p>Using the example you gave:</p>
<pre><code><form>
<input type="text" name="field1" /><!-- Put your cursor in this field and press Enter -->
<input type="submit" name="prev" value="Previous Page" /> <!-- This is the button that will submit -->
<input type="submit" name="n... | 2,245 |
<p>A simple question, but could someone provide sample code as to how would someone call a web service from within the JBoss Seam framework, and process the results?</p>
<p>I need to be able to integrate with a search platform being provided by a private vendor who is exposing his functionality as a web service. So, I... | <p>There's roughly a gajillion HTTP client libraries (Restlet is quite a bit more than that, but I already had that code snippet for something else), but they should all provide support for sending GET requests. Here's a rather less featureful snippet that uses <a href="http://hc.apache.org/httpclient-3.x/tutorial.html... | <pre><code>import org.restlet.Client;
import org.restlet.data.Protocol;
import org.restlet.data.Reference;
import org.restlet.data.Response;
import org.restlet.resource.DomRepresentation;
import org.w3c.dom.Node;
/**
* Uses YAHOO!'s RESTful web service with XML.
*/
public class YahooSearch {
private static final... | 8,098 |
<p>I would like to use nail polish to paint and smooth a PLA model. Could nail polish damage a model made out of pure PLA?</p>
| <p>NO if you want to smooth your print, gently heat the plastic and with a utensil smooth out the plastic. A hair dryer is a good way of doing this but be careful to only lightly melt the outside of the model.</p>
| <p>Nail polish contains acetone. It melts PLA, so yes you <em>could</em> damage it. Google acetone vapor batch to read up on a safer way to do the job.</p>
| 699 |
<p>I wrote a component that displays a filename, a thumbnail and has a button to load/play the file. The component is databound to a repeater. How can I make it so that the button event fires to the main application and tells it which file to play?</p>
| <p>Maybe you should try including a fourth column, stating the table it came from, and then order and group by it:</p>
<pre><code>SELECT A,B,C, "query 1" as origin FROM table WHERE field LIKE 'query%'
UNION
SELECT A,B,C, "query 2" as origin FROM table WHERE field LIKE '%query'
UNION
SELECT A,B,C, "query 3" as origin F... | <p>If there isn't a sort that makes sense to order them you desire, don't union the results together - just return 3 separate recordsets, and deal with them accordingly in your data tier.</p>
| 2,589 |
<p>I would like to generate a random floating point number between 2 values. What is the best way to do this in C#?</p>
| <p>The only thing I'd add to <a href="https://stackoverflow.com/questions/44408/how-do-you-generate-a-random-number-in-c#44428">Eric</a>'s response is an explanation; I feel that knowledge of why code works is better than knowing what code works.</p>
<p>The explanation is this: let's say you want a number between 2.5 ... | <p>How random? If you can deal with pseudo-random then simply:</p>
<pre><code>Random randNum = new Random();
randNum. NextDouble(Min, Max);
</code></pre>
<p>If you want a "better" random number, then you probably should look at the Mersenne Twister algorithm. Plenty of people hav <a href="http://code.msdn.microsoft... | 6,619 |
<p>I'm relatively new in the field of 3D printing and design. By now I've created and printed some technical objects with TinkerCAD, but now I've a task, which I don't know how to solve.</p>
<p>I have the following model as STL-file:
<a href="https://i.stack.imgur.com/o8Bn1.jpg" rel="noreferrer"><img src="https://i.st... | <p>Basically there's no good easy way to do this.</p>
<p>At this point you only have the mesh - a list of triangles - the 3D model you have does not contain the concept of joints or moving parts so it can't regenerate the shoulder after the rotation.</p>
<p>The original author may or may not have the ability to do th... | <p>Basically there's no good easy way to do this.</p>
<p>At this point you only have the mesh - a list of triangles - the 3D model you have does not contain the concept of joints or moving parts so it can't regenerate the shoulder after the rotation.</p>
<p>The original author may or may not have the ability to do th... | 788 |
<p>Sorry for the basic question - I'm a .NET developer and don't have much experience with LAMP setups.</p>
<p>I have a PHP site that will allow uploads to a specific folder. I have been told that this folder needs to be owned by the webserver user for the upload process to work, so I created the folder and then set p... | <p>You can create a new group with both the apache user and FTP user as members and then make the permission on the upload folder 775. This should give both the apache and FTP users the ability to write to the files in the folder but keep everyone else from modifying them.</p>
| <p>Based on the answer from <code>@Ryan Ahearn</code>, following is what I did on <code>Ubuntu</code> 16.04 to create a user <code>front</code> that only has permission for nginx's web dir <code>/var/www/html</code>.</p>
<p><strong>Steps:</strong></p>
<pre>
* pre-steps:
* basic prepare of server,
* create use... | 3,219 |
<p>What kinds of hook scripts are people using for Subversion? Just general ideas but code would be great too!</p>
| <p>I am using the <code>pre-revprop-change</code> hook that allows me to actually go back and edit comments and such information after the commit has been performed. This is very useful if there is missing/erroneous information in the commit comments.</p>
<p>Here I post a <code>pre-revprop-change.bat</code> batch file... | <p>The most common one I think is to allow people to change revision comments after comitting. </p>
<p>You need to enable the 'pre-revprop-change' hook script to allow that. The example provided, if enabled allows editing only the comment property and only be the original comitter. Great for correcting typos.</p>
| 2,797 |
<p>My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is on the same LAN running on an OS X machine. I can log into the webby inter... | <p>It has been a <strong>really</strong> long time since I did anything with FileMaker Pro, but I know that it does have capabilities for an ODBC (and JDBC) connection to be made to it (however, I don't know how, or if, that translates to the linux/perl/python world though). </p>
<p>This article shows how to share/ex... | <p>You'll need the FileMaker Pro installation CD to get the drivers. <a href="http://www.filemaker.com/downloads/pdf/fm9_odbc_jdbc_guide_en.pdf" rel="nofollow noreferrer">This document</a> details the process for FMP 9 - it is similar for versions 7.x and 8.x as well. Versions 6.x and earlier are completely different a... | 4,829 |
<p>In my engine I have a need to be able to detect DXT1 textures that have texels with 0 alpha (e.g. a cutout for a window frame). This is easy for textures I compress myself, but I'm not sure about textures that are already compressed.</p>
<p>Is there an easy way to tell from the header whether a DDS image contains a... | <p>As far as I know, there's no way to tell from the header. There's a DDPF_ALPHAPIXELS flag, but I don't think that will get set based on what's in the pixel data. You'd need to parse the DXT1 blocks, and look for colours that have 0 alpha in them (making sure to check that the colour is actually used in the block, to... | <p>I agree with the accepted answer. Your job may be made a bit easier by using the "squish" library to decompress the blocks for you.</p>
<p><a href="http://www.sjbrown.co.uk/?code=squish" rel="nofollow noreferrer">http://www.sjbrown.co.uk/?code=squish</a></p>
| 3,991 |
<p>Just a simple question about my FEP sheet getting dented after print.
I just bought an Elegoo Mars 2 Pro and had trouble getting it to stick to the bed, after some painful bed leveling and realizing my exposure times were too low for maroon resin, I finally got it to stick to the bed by the 4th print.</p>
<p>Now bef... | <p>The rook is normally difficult to remove, it's designed this way.</p>
<p>Have you tried resetting the height of you build Plate?
If it makes a grinding sound when doing the first 2 or three layers your build plate might be traveling too low.</p>
<p>Also try re-leveling your build plate, e.g. I pushed so hard when I ... | <p>You have not done anything wrong!</p>
<p>Usually, each resin type is suitable for a specific VAT floor. For example, for PDMS floor you should use very specific types of resins.</p>
<p>FEP is known to be very strong and difficult to ruin. But still a couple of things you need to consider:</p>
<ul>
<li>When the resin... | 2,011 |
<p>I own a Creality CR-10 (using Ultimaker Cura for slicing) and I am experiencing terrible printing problems.</p>
<p>My problem: I am not able to print anything that takes several hours to print. For parts printed in 30 minutes or so, my printer usually works.</p>
<p>The prints end up like this (unfinished and with... | <p><strong>Stringing?</strong></p>
<p>The stringing is explained by your relatively low retraction settings, 1.5 mm is not much for a Bowden setup. As do too high printing temperatures.</p>
<p><strong>Stopping mid printing?</strong></p>
<p>What you are experiencing is called clogging, the extruder cannot push t... | <p>I had the same thing! On my anycubic I3 mega.</p>
<p>Tried a lot of stuff and got so sick of it so I installed a 10:1 gearbox on my extruder motor. So now it provides 10x more torque and since I havent got the issue anymore where the extruder is just grinding on the filament and the motor is just skipping steps. </... | 1,186 |
<p>I know that the following is true</p>
<pre><code>int i = 17; //binary 10001
int j = i << 1; //decimal 34, binary 100010
</code></pre>
<p>But, if you shift too far, the bits fall off the end. Where this happens is a matter of the size of integer you are working with.</p>
<p>Is there a way to perform a shift... | <p>If you know the size of type, you could do something like:</p>
<pre><code>uint i = 17;
uint j = i << 1 | i >> 31;
</code></pre>
<p>... which would perform a circular shift of a 32 bit value.</p>
<p>As a generalization to circular shift left n bits, on a b bit variable:</p>
<pre><code>/*some unsigned ... | <p>The extension methods for rotating bits of a <code>uint</code> (32 bits):</p>
<pre><code>public static uint ROR(this uint x, int nbitsShift)
=> (x >> nbitsShift) | (x << (32 - nbitsShift));
public static uint ROL(this uint x, int nbitsShift)
=> (x << nbitsShift) | (x >> (32 - n... | 5,558 |
<p>What I currently do is I link the project to another location and give it the same name, then check the box where it says "Branch after share."
And then I would Check out the shared project and work off it. And finally merge with the original project.</p>
<p>This works okay, but it feels very clunky: I have multip... | <p>I think the way you describe in the question is the only way you can do it in sourceSafe.</p>
<p>I usually name the copied directory "V1.0" (or whatever is appropriate) and keep them all in a folder that is the main project name.</p>
| <p>The way you described is the only supported way to do "branching". And as you pointed out it is rather clunky. In VSS it's best to avoid branching alltogether as it will destroy your source history.</p>
| 9,369 |
<p>I haven't done a lot of .NET programming, but I've examined a few of the application blocks published by Microsoft's Patterns and Practices group. I was wondering how these are typically used:</p>
<ul>
<li>Linked directly into applications</li>
<li>Source added into applications and built with them, perhaps with so... | <p>I usually put the source into my project, and then I can get better intellisense (and a better understanding of them). I don't tend to customize them at all though. I like to have them stock so I can just distribute the stock binaries anytime I need them.</p>
| <p>We use the blocks by adding references to the DLLs, making sure that "copy local" is set so that they are deployed with the app into the app's bin folder. This means that we don't have to muck around with the GAC - much simpler!</p>
<p>When debugging, Visual Studio can still step into the source code even if it's n... | 7,920 |
<p>Could somebody please do a rundown of how to programmatically encrypt a config-file in .NET, preferably in C#.</p>
<p>What I would like to do is do some kind of check on an application's startup to see if a section is unprotected, and if it is, then encrypt it. This for both settings and connection-strings.</p>
<p... | <p>To summarize the answers and what I've found so far, here are some good links to answer this question:</p>
<ul>
<li><a href="https://web.archive.org/web/20211029043331/https://aspnet.4guysfromrolla.com/articles/021506-1.aspx" rel="nofollow noreferrer">Encrypting Configuration Information in ASP.NET 2.0 Applications... | <p>I haven't used it myself, but the Microsoft Enterprise library has good encryption support that will possibly suit your needs:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/cc309503.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/cc309503.aspx</a></p>
| 4,198 |
<p>I don't want to ask off-topic and opinion questions here, but I would like to find a cadre of others dialing in their devices.
Any ideas?</p>
| <p>I stumbled across this forum/group, <a href="https://forum.prusaprinters.org/forum/english-forum-original-prusa-i3-mmu2s-mmu2/" rel="nofollow noreferrer">Original Prusa i3 MMU2S & MMU2</a>, amongst all of the other <a href="https://forum.prusaprinters.org" rel="nofollow noreferrer">Prusa printers forums</a> on t... | <p>There is a lot of activity on Reddit related to 3D printing and the Prusa printers.</p>
| 65 |
<p>I know there are some ways to get notified when the page body has loaded (before all the images and 3rd party resources load which fires the <strong>window.onload</strong> event), but it's different for every browser.</p>
<p>Is there a definitive way to do this on all the browsers?</p>
<p>So far I know of:</p>
<u... | <p>There's no cross-browser method for checking when the DOM is ready -- this is why libraries like jQuery exist, to abstract away nasty little bits of incompatibility.</p>
<p>Mozilla, Opera, and modern WebKit support the <code>DOMContentLoaded</code> event. IE and Safari need weird hacks like scrolling the window or ... | <p>This works pretty well:</p>
<pre><code>setTimeout(MyInitFunction, 0);
</code></pre>
| 9,115 |
<p>In .NET perspective:</p>
<ul>
<li>What is a <a href="https://en.wikipedia.org/wiki/Memory_leak" rel="noreferrer">memory leak</a>?</li>
<li>How can you determine whether your application leaks? What are the effects?</li>
<li>How can you prevent a memory leak?</li>
<li>If your application has memory leak, does it go ... | <p>The best explanation I've seen is in Chapter 7 of the free <a href="http://codebetter.com/karlseguin/2008/06/25/foundations-of-programming-ebook/" rel="noreferrer">Foundations of Programming e-book</a>.</p>
<p>Basically, in <strong>.NET</strong> a memory leak occurs when referenced objects are rooted and thus canno... | <p>One definition is: <strong>Unable to release unreachable memory, which can no longer be allocated to new process during execution of allocating process. It can mostly be cured by using GC techniques or detected by automated tools.</strong></p>
<p>For more information, please visit <a href="http://all-about-java-a... | 2,254 |
<p>What are the different ways (programmatically and otherwise) to determine what versions of .NET are running on a system?</p>
| <p>Directly from the source:</p>
<p><em><a href="http://support.microsoft.com/kb/318785" rel="nofollow noreferrer">How to determine which versions and service pack levels of the Microsoft .NET Framework are installed</a></em></p>
| <p><a href="http://www.hanselman.com/smallestdotnet/" rel="nofollow noreferrer">Get the smallest .NET Framework download possible</a> that will tell you based on the headers you are sending. It only works on Internet Explorer or if you have the Firefox extension installed. More info in <a href="http://www.hanselman.com... | 7,564 |
<p>I have a SqlServer database that I've manually filled with some test data. Now I'd like to extract this test data as insert statements and check it in to source control. The idea is that other team members should be able to create the same database, run the created insert scripts and have the same data to test and d... | <p>EMS DB Extract for SQL Server (<a href="http://www.sqlmanager.net/en/products/mssql/extract" rel="nofollow noreferrer">http://www.sqlmanager.net/en/products/mssql/extract</a>) seems to do what you want, and it seems to be free.</p>
<p>Hope this helps,</p>
<p>Robin</p>
| <p>This works <a href="http://www.sqlscripter.com/" rel="nofollow noreferrer">http://www.sqlscripter.com/</a></p>
<p>New version of SQL Scripter (V2.1) was released last month.</p>
| 4,398 |
<p>I don't want to take the time to learn Obj-C. I've spent 7+ years doing web application programming. Shouldn't there be a way to use the WebView and just write the whole app in javascript, pulling the files right from the resources of the project?</p>
| <p>I found the answer after searching around. Here's what I have done:</p>
<ol>
<li><p>Create a new project in XCode. I think I used the view-based app.</p></li>
<li><p>Drag a WebView object onto your interface and resize.</p></li>
<li><p>Inside of your WebViewController.m (or similarly named file, depending on the na... | <p>At least 2 others mentioned phonegap, but I thought I'd post this too and mention that Apple has approved the phonegap framework. So, now you won't get your app rejected by Apple just because you're using phonegap. </p>
<p><a href="http://blogs.nitobi.com/jesse/2009/11/20/phonegapp-store-approval/" rel="nofollow ... | 8,995 |
<p>I want a splash screen to show while the application is loading. I have a form with a system tray control tied to it. I want the splash screen to display while this form loads, which takes a bit of time since it's accessing a web service API to populate some drop-downs. I also want to do some basic testing for depen... | <p>Well, for a ClickOnce app that I deployed in the past, we used the <code>Microsoft.VisualBasic</code> namespace to handle the splash screen threading. You can reference and use the <code>Microsoft.VisualBasic</code> assembly from C# in .NET 2.0 and it provides a lot of nice services.</p>
<ol>
<li>Have the main for... | <p>Actually mutlithreading here is not necessary.</p>
<p>Let your business logic generate an event whenever you want to update splash screen. </p>
<p>Then let your form update the splash screen accordingly in the method hooked to eventhandler.</p>
<p>To differentiate updates you can either fire different events or p... | 7,133 |
<p>I am a novice programmer who is trying to teach myself to code, specifically in C#. I've taken on a project from a friend of mine and I am not sure what I need to know to get the project done. I suppose the issue is I don't know what I need to know to even get the project started.</p>
<p>I do have many of the basic... | <p><a href="http://msdn.microsoft.com/en-us/library/a72418yk(VS.80).aspx" rel="nofollow noreferrer"><strong>Getting started with Visual C#</strong></a>.</p>
| <p>I started with the <a href="http://www.csharp-station.com/Tutorial.aspx" rel="nofollow noreferrer">C# Station</a> tutorials. "Getting started with Visual C#" gives me the creeps...</p>
| 6,446 |
<p>Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch?</p>
<p>I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts t... | <p>One key piece of advice I can give is that most LiveCDs use a compressed filesystem called squashfs to cram as much data on the CD as possible. Since you don't need compression, you could run the mksquashfs step (present in most tutorials) with -noDataCompression and -noFragmentCompression to save on decompression ... | <p>Depends on your distro. Here's a good article you can check out from <a href="http://lwn.net/Articles/172132/" rel="nofollow noreferrer">LWN.net</a></p>
<p>There is a book I used which covers a lot of distros, though it does not cover creating a flash-bootable image. The book is <a href="https://rads.stackoverflo... | 5,313 |
<p>In Visual Studio you can create a template XML document from an existing schema. The new <a href="http://msdn.microsoft.com/en-us/library/cc716766.aspx" rel="noreferrer">XML Schema Explorer</a> in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data.
Is there a class library ... | <p>some footwork is involved, but you could load the xsd into a DataSet object, iterate over the Tables and add a few rows in each by calling calling NewRow() on each and then adding those rows back into their respective tables.. then save the DataSet out to a file:</p>
<pre><code>DataSet ds = new DataSet();
ds.ReadXm... | <p>Directly, none that I can think of, other than third party add-ons. You could utilize the <a href="http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.80).aspx" rel="nofollow noreferrer">xsd schema definition tool</a> to take your XSD and create a .NET object/class, once you have that, you could, to quote the linked... | 6,304 |
<p>I've been trying to wrap my head around how threads work in Python, and it's hard to find good information on how they operate. I may just be missing a link or something, but it seems like the official documentation isn't very thorough on the subject, and I haven't been able to find a good write-up.</p>
<p>From wha... | <p>Yes, because of the Global Interpreter Lock (GIL) there can only run one thread at a time. Here are some links with some insights about this:</p>
<ul>
<li><a href="http://www.artima.com/weblogs/viewpost.jsp?thread=214235" rel="noreferrer">http://www.artima.com/weblogs/viewpost.jsp?thread=214235</a></li>
<li><a href... | <p>Try to remember that the GIL is set to poll around every so often in order to do show the appearance of multiple tasks. This setting can be fine tuned, but I offer the suggestion that there should be work that the threads are doing or lots of context switches are going to cause problems.</p>
<p>I would go so far as... | 5,127 |
<p>I would like to convert the following string into an array/nested array: </p>
<pre><code>str = "[[this, is],[a, nested],[array]]"
newarray = # this is what I need help with!
newarray.inspect # => [['this','is'],['a','nested'],['array']]
</code></pre>
| <p>You'll get what you want with YAML.</p>
<p>But there is a little problem with your string. YAML expects that there's a space behind the comma. So we need this</p>
<pre><code>str = "[[this, is], [a, nested], [array]]"
</code></pre>
<p>Code:</p>
<pre><code>require 'yaml'
str = "[[this, is],[a, nested],[array]]"
##... | <p>Looks like a basic parsing task. Generally the approach you are going to want to take is to create a recursive function with the following general algorithm</p>
<pre><code>base case (input doesn't begin with '[') return the input
recursive case:
split the input on ',' (you will need to find commas only at this ... | 5,931 |
<p>First of all, I know how to build a Java application. But I have always been puzzled about where to put my classes. There are proponents for organizing the packages in a strictly domain oriented fashion, others separate by tier.</p>
<p>I myself have always had problems with </p>
<ul>
<li>naming, </li>
<li>placing<... | <p>I've really come to like Maven's <a href="http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html" rel="noreferrer" title="S">Standard Directory Layout</a>.</p>
<p>One of the key ideas for me is to have two source roots - one for production code and one for test code like so:<... | <p>One thing I've done in the past - if I'm extending a class I'll try and follow their conventions. For example, when working with the Spring Framework, I'll have my MVC Controller classes in a package called com.mydomain.myapp.web.servlet.mvc
If I'm not extending something I just go with what is simplest. com.mydomai... | 2,915 |
<p>What are the essential vim commands? What does a new-user need to know to keep themselves from getting into trouble? One command per comment, please.</p>
| <p>What I find irreplaceable (because it works in vi also, unlike vim's visual mode) are marks. You can mark various spots with <code>m</code> (lower case) and then a letter of your choice (eg x). Then you go elsewhere, and can go back with ``x<code>(backquote letter) to the exact spot, or with</code>'x` (apostrophe le... | <p>One of my favourite commands is %G which takes to directly to the end of a file. Especially useful in log-files.</p>
| 9,527 |
<p>Coming up with good, precise names for classes is notoriously difficult. Done right, it makes code more self-documenting and provides a vocabulary for reasoning about code at a higher level of abstraction. </p>
<p>Classes which implement a particular design pattern might be given a name based on the well known patt... | <p>I'll cite some passages from <a href="https://rads.stackoverflow.com/amzn/click/com/0321413091" rel="noreferrer" rel="nofollow noreferrer">Implementation Patterns</a> by Kent Beck:</p>
<h2>Simple Superclass Name</h2>
<blockquote>
<p>"[...] The names should be short and punchy.
However, to make the names precise... | <p>If your "FooProcessor" really does process foos, then don't be reluctant to give it that name just because you already have a BarProcessor, BazProcessor, etc. When in doubt, obvious is best. The other developers who have to read your code may not be using the same thesaurus you are.</p>
<p>That said, more specifici... | 5,891 |
<p>I am working in Visual Basic 6 and need to sort by multiple columns in a ListView. For example, sorting a list of music tracks by artist, then album, then track number. As far as I know, VB6 does not support this out of the box. Here are the suggestions I have already heard:</p>
<ul>
<li>Sort the data in a SQL t... | <p>I would create a hidden column in the listview that concatenates those three columns and sort by that</p>
| <p>You can try sorting using the Windows API and callbacks: <a href="http://vbnet.mvps.org/index.html?code/callback/lvsortcallback.htm" rel="nofollow noreferrer">Link</a></p>
<p>Alternatively, you could try switching to a <a href="http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/article.asp" rel="nofollow n... | 6,771 |
<p>The object on the right is a basic C channel, the outer surface should be smooth but the first ~5 mm of filament is missing after every layer change. In this example, the missing filament is reasonably consistent and extreme. The object on the left (from the same print) has a seam where the filament is also missing ... | <p><a href="https://www.instructables.com/Copper-Electroforming-on-3d-Printed-PLAABS-Objects/" rel="nofollow noreferrer">Electroforming</a> is the process of applying a conductive paint to a non-conductive surface. Once dry, the object is subjected to a process similar to electroplating, in that molecules of a conducti... | <p>For your task you basically have several options:</p>
<ol>
<li><strong>Electroforming</strong> (see @fred_dot_u answer). Pros: high electrical conductivity due to actual metal layer; very low friction between polished metal layers. Cons: the process is quite dirty and requires additional materials and processing, pl... | 2,168 |
<p>I'm having an issue where the first layer of my support structures isn't sticking on the edges and causing the print to (eventually) fail. Any ideas on how I can fix it?</p>
<p>I'm using Slic3r.</p>
<p><a href="https://i.stack.imgur.com/XD4AX.jpg" rel="nofollow noreferrer" title="Photograph of first printed layer... | <p>There are many things you'll need to check and/or confirm to ensure that you will have a good bond to the bed. The first is to confirm that you are using a genuine Prusa printer as it appears in the photo. Having built one recently makes it easier for me to guess that is the case.</p>
<p>Have you performed the bed ... | <p>I had a similar issue where slic3r generated supports that attach directly to the bed, but didn't put enough material around the thin supports on the first layer, so they didn't stick to the bed.</p>
<p>To solve this I added a brim, see "skirt and brim" under "print settings". This puts more material around both th... | 578 |
<p>I've seen conflicting advice on the correct printing temperature for Microcenter's house-brand Inland PLA+, particularly after a supplier change announced in April 2018.</p>
<p>There's an <a href="https://www.reddit.com/r/3Dprinting/comments/89grfm/psa_on_our_micro_center_inland_filament/" rel="nofollow noreferrer"... | <p>Even as PLA+ contains some additives, each printer is different. We usually never know what the actual temperature of the printhead is, but if your printer prints good at 205 °C, despite the manufacturer claiming you should use a little more temperature, use it. It might be the perfect combination of temperature and... | <p>A portion of information missing from the manufacturer's specifications and in the question is the print speed. You could have slower speeds than the manufacturer used to perform the tests, which requires lower temperatures to reduce the "flow rate" of the plastic to an acceptable level. </p>
<p>In some cases, I us... | 1,384 |
<p>I'm translating my C# code for YouTube video comments into PHP. In order to properly nest comment replies, I need to re-arrange XML nodes. In PHP I'm using DOMDocument and DOMXPath which closely corresponds to C# XmlDocument. I've gotten pretty far in my translation but now I'm stuck on getting the parent node of a ... | <p><a href="http://no2.php.net/manual/en/class.domelement.php" rel="noreferrer">DOMElement</a> is a subclass of <a href="http://no2.php.net/manual/en/class.domnode.php" rel="noreferrer">DOMNode</a>, so it does have parent_node property. Just use $domNode->parentNode; to find the parent node.</p>
<p>In your example, th... | <p>I'm not entirely sure how your code works, but it seems like you have a small error in your code. </p>
<p>On the line you posted in your question you have <code>$link->parent_node()</code>, but in the answer with the entire code snippet you have <code>$link**s**->parent_node()</code>. </p>
<p>I don't think t... | 4,852 |
<p>Currently I run an classic (old) ASP webpage with recordset object used directly in bad old spagethi code fasion.</p>
<p>I'm thinking of implementing a data layer in asp.net as web serivce to improve manageability. This is also a first step towards upgrading the website to asp.net.
The site itself remains ASP for t... | <p>First my favorite advice of this week: do not treat your Web Service like it if was a local object or you are going to pay a very hefty performance price. Essentially, don't do things like this in your web application:</p>
<pre><code>MyDataWebService ws = new MyDataWebService();
foreach(DataItem item in myData)
{
... | <p>I'd suggest using the XmlHttp class in your ASP code.</p>
<p>Assuming you have an ASMX web service similar to this, in MyService.asmx:</p>
<pre><code>[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
</code></pre>
<p>You could call it in ASP something like this:</p>
<pre><code>Dim xhr
Set xhr =... | 7,901 |
<p>Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ?</p>
<p>Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields.</p>
<p>I've installed version 3.2rc1.</p>
| <p>Indeed, just check ../enter_bug.cgi?format=guided , which forms an example of the template feature. Half the work is already done for you.</p>
| <p>The mechansism described under <a href="https://www.bugzilla.org/docs/2.18/html/cust-templates.html" rel="nofollow noreferrer">6.2.5 Particular Templates</a> (under the section called bug/create/create.html.tmpl and bug/create/comment.txt.tmpl) works pretty well for us. Even though you say you don't want to create ... | 8,363 |
<p>I'm making a simple 2 player game in XNA and started looking into saving the player's high scores.</p>
<p>I want the game to work on the XBox 360 as well as Windows, so I have to use the framework to save the data.</p>
<p>It seems that you save data to a particular user's gamer tag - so my question is, what to do ... | <p>You're right -- looks like Eclipse has acknowledged it as a <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199499" rel="nofollow noreferrer">bug</a>. It's fixed in 3.5.</p>
| <p>I was initially thinking <kbd>Alt</kbd>-<kbd>←</kbd> and <kbd>Alt</kbd>-<kbd>→</kbd> might do what you want, but that's more for going forward and backwards in history of tabs you've viewed. Which might sort of get you what you want, but is probably just as confusing as <kbd>Alt</kbd>-<kbd>F6</kbd>.</p>
<p>I think i... | 8,698 |
<p>I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information.</p>
<p>The command used to paste into Word will be something like:
oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboar... | <p>I would use a hidden RichTextBox, set the Rtf member, then retrieve the Text member to sanitize the RTF in a well-supported way. Then I would use manually inject the desired formatting afterwards.</p>
| <p>Regex it, it wont parse absolutely everything correctly (tables for example) but does the job in most cases.</p>
<pre><code>string unformatted = Regex.Replace(rtfString, @"\{\*?\\[^{}]+}|[{}]|\\\n?[A-Za-z]+\n?(?:-?\d+)?[ ]?", "");
</code></pre>
<p>Magic =)</p>
| 4,081 |
<p>I understand the difference between <code>String</code> and <code>StringBuilder</code> (<code>StringBuilder</code> being mutable) but is there a large performance difference between the two? </p>
<p>The program I’m working on has a lot of case driven string appends (500+). Is using <code>StringBuilder</code> a bett... | <p>Yes, the performance difference is significant. See the KB article "<a href="http://support.microsoft.com/kb/306822" rel="noreferrer">How to improve string concatenation performance in Visual C#</a>".</p>
<p>I have always tried to code for clarity first, and then optimize for performance later. That's much easier... | <p>StringBuilder will perform better, from a memory stand point. As for processing, the difference in time of execution may be negligible.</p>
| 9,955 |
<p>Is there any chance to get this work? I want my tests to be run by nunit2 task in NAnt. In addition I want to run NCover without running tests again. </p>
| <p>I figured it out. You change the path of the NUnit launcher to that of TeamCity's own. Here is an example:</p>
<pre><code> <mkdir dir="${build}/coverage" failonerror="false"/>
<!-- run the unit tests and generate code coverage -->
<property name="tools.dir.tmp" value="${tools.dir}"/>
... | <p>I am having to do the same thing. I think the best we can hope for is to break open the NUnit jar file that comes with TeamCity and writing a custom task that integrates NUnit2 and NCover. I wish this wasn't so, but the NUnit2 task does not produce any visible output, so TeamCity is obviously not reading StdOut for ... | 6,564 |
<p>What are good ways of dealing with the issues surrounding plugin code that interacts with outside system?</p>
<p>To give a concrete and representative example, suppose I would like to use Subversion and Eclipse to develop plugins for WordPress. The main code body of WordPress is installed on the webserver, and the ... | <p>There are a few ways to do what you need in PostgreSQL.</p>
<ul>
<li><p>If you can install modules, look at the tablefunc contrib. It has a connectby() function that handles traversing trees. <a href="http://www.postgresql.org/docs/8.3/interactive/tablefunc.html" rel="noreferrer">http://www.postgresql.org/docs/8.3/... | <p>If you need to store arbitrary graphs, not just hierarchies, you could push Postgres to the side and try a graph database such as <a href="http://agraph.franz.com/support/learning/" rel="nofollow noreferrer">AllegroGraph</a>:</p>
<p>Everything in the graph database is stored as a triple (source node, edge, target n... | 7,654 |
<p>My Y-axis on my Monoprice maker select running ramps 1.4 and Marlin makes a thud noise when moving every now and then. I have noticed a 1 to 2 mm shift in the print when this occurs. I tighten the belts and alas no joy. I ordered new bearings which should be coming Monday. I also tried slowing the print down and... | <p>The issue was the X-axis top smooth rod came out. this caused the extruder to bang around and shift on the Y-axis when it shifted forward. thank everyone for their help. </p>
| <p>A thudding noise is usually a belt slipping through its end-restraints. A clicking noise is usually a stepper motor missing a step. Seized bearings could be the cause.</p>
| 734 |
<p>I have a collection of objects in a database. Images in a photo gallery, products in a catalog, chapters in a book, etc. Each object is represented as a row. I want to be able to arbitrarily order these images, storing that ordering in the database so when I display the objects, they will be in the right order.</... | <p>An other alternative would be (if your RDBMS supports it) to use columns of type array. While this breaks the normalization rules, it can be useful in situations like this. One database which I know about that has arrays is PostgreSQL.</p>
| <p>I had the same issue and have probably spent at least a week concerning myself about the proper data modeling, but I think I've finally got it. Using the array datatype in PostgreSQL, you can store the primary key of each ordered item and update that array accordingly using insertions or deletions when your order c... | 4,155 |
<p>This is mostly geared toward desktop application developers. <br />How do I design a caching block which plays nicely with the GC? <br />How do I tell the GC that I have just done a cache sweep and it is time to do a GC? <br />How do I get an accurate measure of when it is time to do a cache sweep?</p>
<p>Are th... | <p>Actually, the recommended way now is to use <code>mkp.yield</code>, e.g.,</p>
<pre><code>src.p {
mkp.yield 'Some element that has a '
strong 'child element'
mkp.yield ' which seems pretty basic.'
}
</code></pre>
<p>to produce</p>
<pre><code><p>Some element that has a <strong>child element&... | <p>Include a method:</p>
<pre><code>void text(n){
builder.yield n
}
</code></pre>
<p>Most likely you (I) copied this code from somewhere that had a text method, but you didn't also copy the text method. Since MarkupBuilder accepts any name for the name of a tag and browsers ignore unknown markup, it just happene... | 4,315 |
<p>When slicing with Slic3r Prusa edition the top layer of most models turns out pretty bad. There are usually small gaps or weird patterns. This does not happen with Ultimaker Cura, it will have a nice smooth top layer. Is there anything settings wise that I can do in Slic3r to get the same quality of top layer as Ult... | <p><strong>Yes</strong>, you can show more than 300 lines in the terminal; just <a href="https://github.com/foosel/OctoPrint/commit/e9623fdc36c658a5b8abe7769b1b308edfc3f424" rel="nofollow noreferrer">disable auto scrolling</a> (<a href="https://github.com/foosel/OctoPrint/issues/286#issuecomment-99215149" rel="nofollow... | <p><strong>Yes</strong>, you can show more than 300 lines in the terminal; just <a href="https://github.com/foosel/OctoPrint/commit/e9623fdc36c658a5b8abe7769b1b308edfc3f424" rel="nofollow noreferrer">disable auto scrolling</a> (<a href="https://github.com/foosel/OctoPrint/issues/286#issuecomment-99215149" rel="nofollow... | 1,194 |
<p>This is a bit of a long shot, but if anyone can figure it out, you guys can...</p>
<p>In Windows XP, is there any meta-data that comes with a cut and paste action, from which I can ascertain the application that provided the clipboard contents?</p>
<p>Bonus question... if there is such information, is there any wa... | <p>That depends on the clipboard format. If it is plain-text, then no. Unless you want to install global hooks on the clipboard.</p>
<p>Which you cannot do from Java.</p>
| <p>That depends on the clipboard format. If it is plain-text, then no. Unless you want to install global hooks on the clipboard.</p>
<p>Which you cannot do from Java.</p>
| 4,146 |
<p>I probably spend far too much time trying to make my visual interfaces look good, and while I'm pretty adept at finding the right match between usability and style one area I am hopeless at is making nice looking icons.</p>
<p>How do you people overcome this (I'm sure common) problem? I'm thinking of things like i... | <p>Good icons are hard to design. I have tried to design my own, and have used in-house graphics designers as well. However, building a good icon set takes a lot of work, even for the graphic designer.</p>
<p>I believe your best solution is to buy/find a set of icons for use in your projects.</p>
<p>The silk icon set... | <p>You can always go on <a href="http://www.elance.com/p/landing/buyer.html" rel="nofollow noreferrer">Elance</a> and hire someone to make any icons/logos for you. I've done it several times and it's pretty cheap for what you're getting. There is so much competition on that site that someone will eventually come in at ... | 2,845 |
<p>Is there any query which can return me the number of revisions made to the structure of a database table?</p>
<p>Secondly, how can I determine the number of pages (in terms of size) present in mdf or ldf files?</p>
| <p>I think you need to create a <code>trigger</code> and store all changes to the table in a separate table. You can then use this table to get the revision history.</p>
| <p><code>SQL Server</code> doesn't keep track of changes so it can't tell you this.</p>
<p>The only way you may be able to do this is if you had a copy of all the scripts applied to the database.</p>
<p>In order to be able to capture this information in the future you should look at <code>DDL triggers (v2005+)</code>... | 6,030 |
<p>So I know there have been several clicking Extruder threads but have not found any solutions to the one I am having.</p>
<p>Background:
I have a custom Prusa like 3d printer fitted with an MKS board (v1.5) and an MK3 Extruder.</p>
<p>The issue:
<strong>While i can extrude fine when ordering some extrusion, as soon... | <p>It took some digging, but I was able to start scripting a wrapper in C# for the RPC commands.</p>
<ul>
<li><a href="https://github.com/TrueAnalyticsSolutions/MakerBotAgentAdapterCore#api" rel="nofollow noreferrer">C# Wrapper</a> (MTConnect Implementation)</li>
<li>Unofficial <a href="https://github.com/TrueAnalytic... | <h2>The Mystery of Makerbot-Wiki</h2>
<p>According to the Wayback machine, the wiki.makerbot.com went offline on <a href="https://web.archive.org/web/20121126084944/http://wiki.makerbot.com:80/" rel="nofollow noreferrer">31st December 2012</a>:</p>
<blockquote>
<p>Over the past three amazing years, MakerBot owners ... | 1,233 |
<p>I'm dealing with a MySQL table that defines the JobName column as UNIQUE. If somebody tries to save a new Job to the database using a JobName that is already in the database, MySQL throws a warning.</p>
<p>I would like to be able to detect this warning, just like an error, in my PHP script and deal with it appropr... | <p>For warnings to be "flagged" to PHP natively would require changes to the mysql/mysqli driver, which is obviously beyond the scope of this question. Instead you're going to have to basically check every query you make on the database for warnings:</p>
<pre><code>$warningCountResult = mysql_query("SELECT @@warning_... | <p>Updated to remove the stuff about errno functions which I now realize don't apply in your situation...</p>
<p>One thing in MySQL to be wary of for <code>UPDATE</code> statements: <code>mysqli_affected_rows()</code> will return zero even if the <code>WHERE</code> clause matched rows, but the <code>SET</code> clause ... | 6,985 |
<p>I'm getting into ASP.NET (C# - I know it doesn't matter for this particular question, but full disclosure and all that), and while I love that the <code>asp:</code>-style controls save me a lot of tedious HTML-crafting, I am often frustrated with certain behaviors. I encountered one last night when working with Mast... | <p>Personally, </p>
<p>I think the standard ASP.NET controls are fine for inhouse stuff - quick and dirty is good in that scenario. But, I once worked with a web developer who was also a designer and he refused to use the ASP.NET controls and only code in HTML and add runat="server" tags when needed. This was more bec... | <p>If the ID's prefix added by ASP.NET is an issue for you to access them later using JS or something... you have the .ClientID property server side.</p>
<p>If the overhead added by ASP.NET you should consider ASP.NET MVC (still preview) where you have full control over the emitted html.</p>
<p>I'm moving to MVC beca... | 4,209 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.