instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>If I have a query like:</p>
<pre><code>Select EmployeeId
From Employee
Where EmployeeTypeId IN (1,2,3)
</code></pre>
<p>and I have an index on the <code>EmployeeTypeId</code> field, does SQL server still use that index?</p>
| <p>Yeah, that's right. If your <code>Employee</code> table has 10,000 records, and only 5 records have <code>EmployeeTypeId</code> in (1,2,3), then it will most likely use the index to fetch the records. However, if it finds that 9,000 records have the <code>EmployeeTypeId</code> in (1,2,3), then it would most likely... | <pre><code>Select EmployeeId From Employee USE(INDEX(EmployeeTypeId))
</code></pre>
<p>This query will search using the index you have created. It works for me. Please do a try.. </p>
| 5,147 |
<p>I'm able to successfully uninstall a third-party application via the command line and via a custom Inno Setup installer. </p>
<p>Command line Execution:</p>
<pre><code>MSIEXEC.exe /x {14D74337-01C2-4F8F-B44B-67FC613E5B1F} /qn
</code></pre>
<p>Inno Setup Command:</p>
<pre><code>[Run]
Filename: msiexec.exe; Flags:... | <p><strong>Step 1:</strong> <a href="https://stackoverflow.com/questions/15109/visual-studio-2005-setup-project-install-crashes-over-terminal-server#15286">Check the MSI error log files</a></p>
<p>I'm suspicious that your problem is due to running as LocalSystem. </p>
<p>The Local System account is not the same as a ... | <p>This is bizarre. LocalSystem definitely has the privileges to install applications (that's how Windows Update and software deployment in Active Directory work), so it should be able to uninstall as well.</p>
<p>Perhaps the application is initially installed per-user instead of per-machine?</p>
| 7,927 |
<p>When attempting to compile my C# project, I get the following error:</p>
<pre><code>'C:\Documents and Settings\Dan\Desktop\Rowdy Pixel\Apps\CleanerMenu\CleanerMenu\obj\Debug\CSC97.tmp' is not a valid Win32 resource file.
</code></pre>
<p>Having gone through many Google searches, I have determined that this is usua... | <p>I don't know if this will help, but from <a href="http://forums.msdn.microsoft.com/en-US/csharplanguage/thread/4217bec6-ea65-465f-8510-757558b36094/" rel="noreferrer">this forum</a>:</p>
<blockquote>
<p>Add an .ico file to the application section of the properties page, and recieved the error thats been described... | <p>Is this a file you created and added to the project or did it mysteriously show up?</p>
<p>You can maybe check your .csproj file and see how it is being referenced (it should be a simple xml file and you can search for CSC97.tmp).</p>
<p>Perhaps post the information you find so we can have more details to help sol... | 2,865 |
<p>I'm creating PDFs on-demand with ColdFusion's <a href="http://cfquickdocs.com/cf8/?getDoc=cfdocument" rel="nofollow noreferrer">CFDocument</a> tag, like so:</p>
<pre><code><cfdocument format="PDF" filename="#attributes.fileName#" overwrite="true">
<cfdocumentitem type="footer">
<table bor... | <p>A PDF is what I'm after, so I'm not sure how outputting another format would help.</p>
<p>As it turns out, the footer space just wasn't enough to fit all of this text; verified by the fact that changing the font size to 4pt would fit it all in without a problem.</p>
<p>I spent some time attempting to rewrite the f... | <p>Usually when PDF shows blank text, it's because the font metrics are embedded in the document, but the glyphs are not. I know nothing about ColdFusion, but you might try the following:</p>
<ul>
<li>Try a font other than Tahoma as a test. All PDF readers must support 14 basic fonts, including 4 Helvetica variants,... | 4,621 |
<p>Does anyone know where online copies of the old <em>The Perl Journal</em> articles can be found?</p>
<p>I know they are now owned by Dr. Dobb's, just the main page for it says they are part of whatever section the subject matter is relevant too, rather than being indexed together. That said, I have never been able ... | <p>Volumes 1-5 (1996 -> 2000) can be found at <a href="http://www.foo.be/docs/tpj/" rel="noreferrer">http://www.foo.be/docs/tpj/</a></p>
<p>Hmm, looks like that was the entire run? I though it was longer than that for some reason.</p>
| <p>Randal Schwartz's Perl Journal articles are linked from <a href="http://www.stonehenge.com/merlyn/PerlJournal/" rel="nofollow noreferrer"><a href="http://www.stonehenge.com/merlyn/PerlJournal/" rel="nofollow noreferrer">http://www.stonehenge.com/merlyn/PerlJournal/</a></a></p>
| 2,700 |
<p>Is it possible to handle POSIX signals within the Java Virtual Machine?</p>
<p>At least <a href="http://en.wikipedia.org/wiki/SIGINT_(POSIX)" rel="noreferrer">SIGINT</a> and <a href="http://en.wikipedia.org/wiki/SIGKILL" rel="noreferrer">SIGKILL</a> should be quite platform independent.</p>
| <p>The JVM responds to signals on its own. Some will cause the JVM to shutdown gracefully, which includes running shutdown hooks. Other signals will cause the JVM to abort without running shutdown hooks.</p>
<p>Shutdown hooks are added using <a href="http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html#addShut... | <p>Perhaps <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook%28java.lang.Thread%29" rel="nofollow noreferrer">Runtime#addShutdownHook</a> ?</p>
| 6,162 |
<p>My printer has been doing weird things lately. It used to print fine, but now it's like the Y or X axis after a certain percentage time.
ie on a 24 hour print: it got off at 5 hours
on a 42 print it got off at 16%</p>
<p>Thoughts?</p>
| <p>That depends on how much noise you have on your motor power supply ground. You definitely want the 100 µF capacitor to have a good high frequency response. Motors turning on and off can be noisy, and that noise can cause false clock signals in your logic circuitry if you tie the grounds together. </p>
| <p>That depends on how much noise you have on your motor power supply ground. You definitely want the 100 µF capacitor to have a good high frequency response. Motors turning on and off can be noisy, and that noise can cause false clock signals in your logic circuitry if you tie the grounds together. </p>
| 1,342 |
<p><strong>How do you install svn 1.5 on debian etch?</strong> The svn 1.5 packages available for etch are 1.4 and I really need the cool new merge tracking feature in svn1.5 (according to CollabNet its as good as ClearCase...an interesting statement in oh so many ways). So, what's the least painful way to go?</p>
... | <p>Have you considered <a href="http://wiki.debian.org/AptPinning" rel="nofollow noreferrer">pinning</a>? Basically, you can upgrade <em>some</em> of your system (i.e. just Subversion and its dependencies) to Lenny, while keeping the rest as Etch.</p>
| <p>It depends on whether you want to be able to upgrade Subversion in future using Debian's package management tools. Building it from source should be easy enough, and lets you configure it the way you want, but then each time you want to upgrade, you'll need to build it from source again, rather than a simple apt-ge... | 9,224 |
<p>What tools are available for metamodelling? </p>
<p>Especially for developing diagram editors, at the moment trying out <a href="http://www.eclipse.org/modeling/gmf/" rel="nofollow noreferrer">Eclipse GMF</a></p>
<p>Wondering what other options are out there?
Any comparison available?</p>
| <p>Your question is simply too broad for a single answer - due to many aspects.</p>
<p>First, meta-modelling is not a set term, but rather a very fuzzy thing, including modelling models of models and reaching out to terms like MDA.</p>
<p>Second, there are numerous options to developing diagram editors - going the Ec... | <p>Although generally a UML tool, I would look at <a href="http://staruml.sourceforge.net/en/" rel="nofollow noreferrer">StarUML</a>. It supports <a href="http://staruml.sourceforge.net/en/modules.php" rel="nofollow noreferrer">additional modules beyond what are already built in</a>. If it doesn't have what you need bu... | 7,485 |
<p>When you use Visual Studio's code analysic (FxCop), and want to suppress a message there are 3 options.</p>
<ol>
<li>Suppress a violation in code.</li>
<li>Suppress a violation in a GlobalSupression.cs file.</li>
<li>Disable the violation check in the project file (via Project -> Properties -> Code Analysic).</li>
... | <p>Suppressing multiple violations with a single <strong>SuppressMessage</strong> attribute is officially not supported. Apparently, this is by design.</p>
<p>I agree, it might be annoying at times, but I can't say I disagree with the decision, since the attribute is their way to force you to say, "Yes, I know what I ... | <p>I think things have changed since this question was posted and answered. For Visual Studio 2010 and 2012 you can create a custom "rule set" file where you can specify which code analysis rules you want to suppress. </p>
<p><a href="http://msdn.microsoft.com/en-us/library/dd380660.aspx" rel="nofollow">http://msdn.mi... | 9,844 |
<p>How can I achieve keeping the motors active during pause to avoid moving their position during filament changes? I have changed the filament during some prints to change the color or to change the a newer spool, but sometimes the X axis is moved during the change. I'm now using some cloth clips to prevent moving du... | <p>Is <code>ADVANCED_PAUSE_FEATURE</code> enabled in your printers <code>configuration_adv.h</code> file?
There is a <code>PAUSE_PARK_NO_STEPPER_TIMEOUT</code> option included in there, which prevents the steppers from timing out during a pause, and may be more robust than a G-Code command if you plan to manually pause... | <p>I have not tried this, but you could use the <code>M84 S0</code> command, this prevents the motors to go into an idle state.</p>
<p>From the <a href="https://reprap.org/wiki/G-code#M84:_Stop_idle_hold" rel="nofollow noreferrer"><code>M84</code> G-code wiki</a> (firmware specific!):</p>
<blockquote>
<p>On <strong... | 1,069 |
<p>What is a <strong>non recursive</strong> algorithm for deciding whether a passed in amount can be built additively from a set of numbers.<br>
In my case I'm determining whether a certain currency amount (such as $40) can be met by adding up some combination of a set of bills (such as $5, $10 and $20 bills). That is... | <p>You have twice stated that the algorithm cannot be recursive, yet that is the natural solution to this problem. One way or another, you will need to perform a search to solve this problem. If recursion is out, you will need to backtrack manually.</p>
<p>Pick the largest currency value below the target value. If it'... | <p><strong>Edit:</strong> The following will work <em>some</em> of the time. Think about why it won't work all the time and how you might change it to cover other cases.</p>
<p>Build it starting with the largest bill towards the smallest. This will yeild the lowest number of bills.</p>
<p>Take the initial amount an... | 9,030 |
<p>I'm currently working on upgrading a product for the Chinese market. The target is a ARMTDMI7 with a QVGA display. Most resources I've located on the net are targeted at desktop or web programming rather than embedded devices.</p>
<ul>
<li>Can anyone suggest some tools and
resources that might be useful?</li>
<li>W... | <p>I suggest looking at EasyGUI but that depends on what graphics controller you use.</p>
<p>EasyGUI is a tool that simplifies design of user interfaces and comes with complete source code and driver for a varity of display controllers.</p>
<p>For localization you can use EasyTranslate that gives the translater a gra... | <p>Freetype might be good for rendering fonts.</p>
<p><a href="http://www.freetype.org/" rel="nofollow noreferrer">www.freetype.org</a></p>
| 7,743 |
<p>I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this:</p>
<pre><code>procedure TForm1.CalculateGP(..)
const
Price : money = 0;
begin
...
Price := 1.0;
...
end;
</code></pre>
<p>So in... | <p>You need to turn assignable typed constants on.
Project -> Options -> Compiler -> Assignable typed Constants</p>
<p>Also you can add <code>{$J+}</code> or <code>{$WRITEABLECONST ON}</code> to the pas file, which is probably better, since it'll work even if you move the file to another project.</p>
| <p>Like Barry said, people took advantage of consts; One of the ways this was used, was for keeping track of singleton instances.
If you look at a classic singleton implementation, you would see this :</p>
<pre><code> // Example implementation of the Singleton pattern.
TSingleton = class(TObject)
protected
co... | 7,137 |
<p>I have a problem in regards to filament jam, however I don't think that my case is any related to the extruder nozzle.
After 30 to 40 minutes printing my filament bends and get stuck on the tube entrance.
To print a nut wheel which comes as a demo file, I had to repeat the operation 4 times, and I had to stop printi... | <p>Something is stopping the filament from going down the tube 30 to 40 min. after you start printing. You are correct that this doesn't sound like a clogged nozzle. It could be deformed filament, but the closeness of the timing after the start sounds like heat creep. Other possibilities are also listed at the linke... | <p>You need a better filament quality I have the same printer and I had switched to Overture. Know use PLA Plus or (PLA+)due to not sticking to the bed well enough and your issue. And this issue may be the way the entire module moves up and down the threads may need better positioning like tighten loosen or even level... | 1,921 |
<p>Certainly there's the difference in general syntax, but what other critical distinctions exist? There are <em>some</em> differences, right?</p>
| <p>The linked comparisons are very thorough, but as far as the main differences I would note the following:</p>
<ul>
<li><strike>C# has anonymous methods</strike>VB has these now, too</li>
<li><strike>C# has the yield keyword (iterator blocks)</strike>VB11 added this</li>
<li>VB supports <a href="http://smartypeeps.bl... | <p>When it gets to IL its all just bits. That case insensitivity is just a precompiler pass.
But the general consensus is, vb is more verbose.
If you can write c# why not save your eyes and hands and write the smaller amount of code to do the same thing.</p>
| 3,272 |
<p>I'm considering removing the driver motor from the extruder assembly, and placing it on a stationary mount point instead, and then using a flex-shaft type connector from the motor to the extruder assembly to actually drive the extruder. The motivation for this change is to reduce the overall weight of the extruder d... | <p>Very cool idea, </p>
<p>One motor would definitely be more than capable of producing the required torques even through a flexshaft connector. For any normal sized 3D-printer the torques required, and the speeds you'll need for rapid response are well within the capabilities of any off-the-shelf stepper motor. </p>
... | <p>If you're talking about a common 3D printer stepper motor and driver, then one driver is perfectly capable of driving the motor both forward and backward.</p>
<p><strike>The flex tube setup you describe sounds like a <a href="https://en.wikipedia.org/wiki/Bowden_cable" rel="nofollow noreferrer">Bowden extruder</a><... | 563 |
<p>I've been developing a "Form Builder" in Javascript, and coming up to the part where I'll be sending the spec for the form back to the server to be stored. The builder maintains an internal data structure that represents the fields, label, options (for select/checkbox/radio), mandatory status, and the general sortin... | <p>When making and processing requests with JavaScript, I live and breath <a href="http://json.org/" rel="noreferrer">JSON</a>. It's easy to build on the client side and there are tons of parsers for the server side, so both ends get to use their native tongue as much as possible. </p>
| <p>I'd implement some sort of custom <code>text serialization</code> and transmit plain text. As you say, you can rebuild the information doing the reversed process.</p>
| 3,725 |
<p>The image below I indicated where the point where the tip of my extruder returns after changing the layer height, I don't know if I am right to call this point "Start Point" ...</p>
<p><a href="https://i.stack.imgur.com/mZmgC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mZmgC.jpg" alt... | <p>Photo interpretation: I understand that the image on the right presents the actual error: it happens on many layers, following the red "Starting Point" line (so above it on the photo). Interesting issue. Btw. which side of the print is the bottom (zero layer)? - I believe the left side, and the right side ... | <p>Photo interpretation: I understand that the image on the right presents the actual error: it happens on many layers, following the red "Starting Point" line (so above it on the photo). Interesting issue. Btw. which side of the print is the bottom (zero layer)? - I believe the left side, and the right side ... | 1,819 |
<p>This question is the other side of the question asking, "<a href="https://stackoverflow.com/questions/11/how-do-i-calculate-relative-time">How do I calculate relative time?</a>".</p>
<p>Given some human input for a relative time, how can you parse it? By default you would offset from <code>DateTime.Now()</code>, b... | <p>That's building a DSL (Domain specific language) for date handling. I don't know if somebody has done one for .NET but the construction of a DSL is fairly straightforward:</p>
<ol>
<li>Define the language precisely, which input forms you will accept and what will you do with ambiguities</li>
<li>Construct the gramm... | <p>This: <a href="http://www.codeproject.com/KB/edit/dateparser.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/edit/dateparser.aspx</a>
Is fairly close to what you are trying to accomplish. Not the most elegant solution, but certainly might save you some work.</p>
| 7,919 |
<p>From <a href="http://blog.stackoverflow.com/2010/07/the-7-essential-meta-questions-of-every-beta/">The 7 Essential Meta Questions of Every Beta</a>:</p>
<hr />
<h2>What should our documentation contain?</h2>
<p>Much of the sites documentation will be the same as on every other Stack Exchange site: “be nice,” “how to... | <h1>Do worry about it (at least a little bit).</h1>
<p>We need to have at least a rough idea of what is on and off topic to know what the site will be about. Without a least some discussion on this how will mods know when a question needs to be closed? Thats not to say that nothing will change or that we can't refine ... | <h1>Don't worry about this.</h1>
<p>Before you worry about what you're Tour Page, Help Center... and stop is going to contain, you <em>first need to figure out what your site is about</em>. Make sure that you explain every close vote, discuss every controversial question, and so on. If you don't know the details of yo... | 3 |
<p>I would like to move a file or folder from one place to another within the same repository without having to use Repo Browser to do it, and without creating two independent add/delete operations. Using Repo Browser works fine except that your code will be hanging in a broken state until you get any supporting chang... | <p>To move a file or set of files using <code>Tortoise SVN</code>, right-click-and-drag the target files to their destination and release the right mouse button. The popup menu will have a <code>SVN move versioned files here</code> option.</p>
<p><strong>Note that the destination folder must have already been added to... | <p>Use the <code>svn move</code> command to move file/folder.</p>
| 8,806 |
<p>Let's say I'm creating a chess program. I have a function</p>
<pre><code>void foreachMove( void (*action)(chess_move*), chess_game* game);
</code></pre>
<p>which will call the function pointer action on each valid move. This is all well and good, but what if I need to pass more parameters to the action function? ... | <p>Ah, if only C supported closures...</p>
<p>Antonio is right; if you need to pass extra parameters, you'll need to redefine your function pointer to accept the additional arguments. If you don't know exactly what parameters you'll need, then you have at least three choices:</p>
<ol>
<li>Have the last argument in yo... | <p>+1 to Antonio. You need to change your function pointer declaration to accept additional parameters.</p>
<p>Also, please don't start passing around void pointers or (especially) arrays of void pointers. That's just asking for trouble. If you start passing void pointers, you're going to also have to pass some kin... | 3,248 |
<p>I made some 3D printed supports for tools, using screws to fix it to the wall, some of them broken because of the screw forces. Is there a way to reinforce only the screw holes where it will have more stress/compress? I am using PLA, Fusion 360 and Ultimaker Cura.</p>
| <p>You can test different print settings. Trying to visualize, but I believe you can increase the <strong>perimeter lines</strong>, since there is a hole, this will increase the resistance in that area. Or try to change the <strong>orientation</strong> with which the part will be printed</p>
| <p>You can use a washer between the screw head and the plastic material to distribute the load</p>
<p>In my designs I also put in a depression to fit the washer so that it sits flush with the resultant surface. </p>
<p><a href="https://i.stack.imgur.com/2Mh31.png" rel="nofollow noreferrer"><img src="https://i.stack... | 1,198 |
<p>I am refactoring some CSS on a website. I have been working on, and noticed the absence of traditional HTML IDs in the code. </p>
<p>There is heavy use of <code>CssClass='&hellip;'</code>, or sometimes just <code>class='&hellip;'</code>, but I can't seem to find a way to say id='…' and not have it sw... | <p>The 'crap' placed in front of the id is related to the container(s) of the control and there is no way (as far as I know) to prevent this behavior, other than not putting it in any container. </p>
<p>If you need to refer to the id in script, you can use the ClientID of the control, like so:</p>
<pre><code><scri... | <p>.Net will always replace your id values with some mangled (every so slightly predictable, but still don't count on it) value. Do you really NEED to have that id runat=server? If you don't put in runat=server, then it won't mangle it...</p>
<p>ADDED:
Like leddt said, you can reference the span (or any runat=server... | 9,076 |
<p>This snippet of Perl code in my program is giving the wrong result.</p>
<pre><code>$condition ? $a = 2 : $a = 3 ;
print $a;
</code></pre>
<p>No matter what the value of <code>$condition</code> is, the output is always 3, how come?</p>
| <p>This is explained in the Perl <a href="http://perldoc.perl.org/perlop.html#Conditional-Operator" rel="noreferrer">documentation</a>.</p>
<p>Because of Perl operator precedence the statement is being parsed as</p>
<pre><code>($condition ? $a= 2 : $a ) = 3 ;
</code></pre>
<p>Because the ?: operator produces an ass... | <p>One suggestion to Tithonium's answer above:</p>
<p>If you are want to assign different values to the same variable, this might be better (the copy-book way): </p>
<p>$a = ($condition) ? 2 : 3;</p>
| 3,047 |
<p>I currently have a print job that is about 50% done, been running for 2 hours with 2 hours remaining. One side is curling/warping pretty bad, and I'm afraid there's no possible way this is going to finish without serious problems if I don't intervene.</p>
<p>So what I'm doing is either brilliant or idiotic, I'm no... | <p>Three thoughts:</p>
<ol>
<li>bed temperature</li>
<li>rim width</li>
<li>bonding agent</li>
</ol>
<p>Bed Temperature:</p>
<p>Often the edges of a heated bed are not as hot as the center. Making the heat pass through an insulator (the glass) makes the temperature profile on the corners more relatively cool compar... | <p>More glue to hold it down and lower in-fill percentage will reduce the warping. Or adding more cut-outs to the design like you have further up the shaft. </p>
| 724 |
<p>I'm looking for a methodology to easily measure/evaluate Z positioning accuracy, using equipment on hand or easily obtainable such as a high-precision digital caliper. In particular I want to be able to evaluate whether steps (actual motor steps, or some other chosen unit of increment) are uniformly the nominal step... | <p>In the world of hobbyist milling machines, a DRO accessory is extremely valuable for improving work flow and accuracy of project builds. The Digital Read Out devices run the gamut from affordable to astonishingly expensive and cover one, two and three axis readouts.</p>
<p>For single axis purposes, some hobbyists wi... | <p>What you ask is probably not easily doable: you want to measure distances with no more than 1 micron error!</p>
<p>1 micron because assuming 2 mm leadscrew pitch and full steps only, you have 100 full steps per mm (10 microns per step). With 10% error at most you need to measure 1 micron.</p>
<p>What you can do is a... | 1,774 |
<p><strong>I was wondering if this printer(daVinci 1.0) had the ability to print very small objects, like insects, coins, or small nuts. (About the size of 1 -2 cubic centimeters)</strong></p>
<p><a href="http://us.xyzprinting.com/us_en/Product/da-Vinci-1.0-AiO" rel="nofollow">Here</a> is a link to the printer on the... | <p>1) If we're talking about FFF/FDM printers:</p>
<p>Accuracy of the electronics and motors allows it, yes.
But how FDM printers work it might be very hard to lay down layers of molten plastic so small as to preserve little details in the X and Y axis, not much of a problem doing 20 micron layer height though (Z reso... | <p>Strictly by looking at the technical specifications of an FDM printer, there are a few things to note regarding the <em>maximum print quality</em> you can expect to achieve:</p>
<ul>
<li>The <strong>minimum layer height</strong> - here given to be <em>0.1 mm</em></li>
<li>The <strong>nozzle diameter</strong> - her... | 195 |
<p>We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?</p>
| <p>Have you tried logging into Linux as your installed Oracle user then</p>
<pre><code>sqlplus "/ as sysdba"
</code></pre>
<p>When you log in you'll be able to change your password.</p>
<pre><code>alter user sys identified by <new password>;
</code></pre>
<p>Good luck :)</p>
| <p>You can connect to the database locally using the combination of environment variables:</p>
<ul>
<li><strong>ORACLE_HOME</strong> </li>
<li><strong>ORACLE_SID</strong> .</li>
</ul>
<p>Depending on your <strong>OS</strong>:</p>
<p><strong>Unix/Linux:</strong></p>
<pre><code>export ORACLE_HOME=<oracle_home_dire... | 7,549 |
<p>How do I prevent vim from replacing spaces with tabs when autoindent is on?</p>
<p>An example: if I have two tabs and 7 spaces in the beginning of the line, and <code>tabstop=3</code>, and I press Enter, the next line has four tabs and 1 space in the beginning, but I don't want that...</p>
| <p>It is perhaps a good idea not to use tabs at all.</p>
<pre><code>:set expandtab
</code></pre>
<p>If you want to replace all the tabs in your file to 3 spaces (which will look pretty similar to <code>tabstop=3</code>):</p>
<pre><code>:%s/^I/ /
</code></pre>
<p>(where <code>^I</code> is the <kbd>TAB</kbd> charac... | <p><a href="http://www.jwz.org/doc/tabs-vs-spaces.html" rel="nofollow noreferrer">Maybe the bottom of this can help you?</a></p>
<blockquote>
<p>Standard vi interprets the tab key literally, but there are popular vi-derived alternatives that are smarter, like vim. To get vim to interpret tab as an ``indent'' command in... | 9,542 |
<h2>Question</h2>
<p>What is PLA+? How is it different than PLA? I'm looking for science, composition, formula, safety concerns (or lack thereof), etc.</p>
<h2>Background</h2>
<p>I picked up a roll of PLA+ at Microcenter (their in-house Inland brand) because it was on clearance. I didn't even notice the "+" until ... | <p>Disclaimer: I am not affiliated with any linked brand or company, I just link to them for reference of the suggested print settings.</p>
<h1>What is PLA?</h1>
<p>PLA is, by its definition PolyLacticAcid, a polymer of entwined lactic acids. It is commonly made from fermenting starch - not via Type I (alcohol) but Typ... | <p>Adding this as a new answer since it doesn't seem to be covered in existing ones:</p>
<p>Despite "PLA+" being a marketing term without a specific definition, I've found that many (most?) filament vendors don't seem to be doing their own secret-sauce blending to make it, and most premium filament vendors wh... | 746 |
<p><a href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors" rel="noreferrer">CSS Attribute selectors</a> allow the selection of elements based on attribute values. Unfortunately, I've not used them in years (mainly because they're not supported by all modern browsers). However, I remember distinctly th... | <p>As for CSS 2.1, see <a href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors" rel="noreferrer">http://www.w3.org/TR/CSS21/selector.html#attribute-selectors</a></p>
<p>Executive summary:</p>
<pre>
Attribute selectors may match in four ways:
[att]
Match when the element sets the "att" attri... | <p>Note that, in Antti's example you'd probably want to add a catch for any absolute links you may have to your own domain, which you probably <strong>don't</strong> want to flag as 'external', e.g.:</p>
<pre><code>a[href^="http://your.domain.com"]
{
background: none;
padding: 0;
}
</code></pre>
<p>And you'd ... | 7,189 |
<p>I need a C# profiler.</p>
<p>Although I'm not averse to paying for one, something which is free or at least with a trial version would be ideal since it takes time to raise a purchase order.</p>
<p>Any recommendations?</p>
| <p>You can try the following:</p>
<ul>
<li><a href="http://nprof.sourceforge.net/Site/Description.html" rel="noreferrer">nprof</a> (free but kinda old)</li>
<li><a href="http://sourceforge.net/projects/profilesharp/" rel="noreferrer">ProfileSharp</a> (open source)</li>
<li><a href="http://memprofiler.com/" rel="norefe... | <p>I found the <a href="http://memprofiler.com/" rel="nofollow noreferrer">.NET Memory Profiler</a> yesterday, and I must say that I'm very impressed by it.<br>
I'm going to order my license today.</p>
| 3,185 |
<p>Are there any good PL/SQL libraries for JSON that you've worked with and found useful?</p>
<p>In <a href="http://www.oracle.com/technology/tech/pl_sql/index.html" rel="noreferrer">PL/SQL</a>, I'm having to tediously hand code the return of <a href="http://www.json.org/" rel="noreferrer">JSON</a> values to JavaScript... | <p>@Geoff- </p>
<p>The system, which has been in production for 8+ years, was architected to use PL/SQL for the CRUDs and <em>most</em> of the business logic. The PL/SQL also generates 90% of the presentation layer (HTML/JavaScript), using <a href="http://www.orafaq.com/wiki/Mod_plsql_FAQ" rel="nofollow noreferrer">... | <p>I wonder why you don't want to bring the data from Oracle into some application code and make JSON there?</p>
| 4,623 |
<p>Given a (source) patch file, what's the easiest way to apply this patch on the source files under Windows?</p>
<p>A GUI tool where I can visually compare the unchanged-changed source lines would be great.</p>
| <p><a href="http://gnuwin32.sourceforge.net/packages/patch.htm" rel="noreferrer">Patch for Windows</a> is what you're looking for.</p>
| <p>WinMerge is awesome.</p>
<p><a href="http://winmerge.org/" rel="nofollow noreferrer">http://winmerge.org/</a></p>
| 4,004 |
<p>I'm running a long process stored procedure.</p>
<p>I'm wondering if in case of a timeout or any case of disconnection with the database after initiating the call to the stored procedure. Is it still working and implementing the changes on the server?
</p>
| <blockquote>
<p>Anyway if the client is not there to commit at the end of the job the changes should be rolled back by the server.</p>
</blockquote>
<p>In other words, if you have a stored procedure making changes to the database and there is a possibility that the connection might disconnect in the middle, be sure ... | <p>I would suggest running your profiler on the database and watching the activity, and also create a basic test case so that you know for sure what happens. The outcome is dependent on your database and what you are using to connect to it.</p>
| 4,476 |
<p>Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal?</p>
<p>What level do you hold your code to when you... | <p>a) Must look the same</p>
<p>b) As standards-compliant as possible, but not so anal that it blocks finishing work</p>
<p>In a situation where you have perpetual access to the code, I don't think standards-compliance is all that important, since you can always make changes to the code if something breaks. If you do... | <p>I think validation is a good litmus test of whether you've done things properly, so if there are only a few minor problems, why not fix them and ensure your site will at least be understood correctly by browsers in the future (even if they do render things differently for other reasons)?</p>
<p>OTOH, for most proje... | 2,950 |
<p>When creating a new ASP.NET project in Visual Studio should I chose create: website or project? </p>
<p>I understand that web application project was the way to do it back in the day with VS 2003 but is it still applicable today? What are some of the caveats using one over the other?</p>
| <p>There's a <a href="http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx#wapp_topic5" rel="noreferrer">pretty good comparison chart on MSDN</a>.</p>
<p>Website projects are simple, in that all files added to the project folders are automatically compiled and included, which was supposedly added to make it mo... | <p>I strongly disagree with some of what the <a href="http://igurr.com/blogs/programming/archive/2009/03/25/websites-and-web-projects.aspx" rel="nofollow noreferrer">Websites and Web Projects</a> article says.</p>
<p>First, it wasn't any "small" group of developers who rebelled - I'd suggest it was most of us, who had... | 3,195 |
<p>I'm writing an AJAX app, but as the user moves through the app, I'd like the URL in the address bar to update despite the lack of page reloads. Basically, I'd like for them to be able to bookmark at any point and thereby return to the current state. </p>
<p>How are people handling maintaining RESTfulness in AJAX ap... | <p>The way to do this is to manipulate <code>location.hash</code> when AJAX updates result in a state change that you'd like to have a discrete URL. For example, if your page's url is:</p>
<blockquote>
<p><a href="http://example.com/" rel="nofollow noreferrer">http://example.com/</a></p>
</blockquote>
<p>If a clie... | <p>SWFAddress works in Flash & Javascript projects and lets you create bookmarkable URLs (using the hash method mentioned above) as well as giving you back-button support.</p>
<p><a href="http://www.asual.com/swfaddress/" rel="nofollow noreferrer">http://www.asual.com/swfaddress/</a></p>
| 2,384 |
<p>I'm mainly a C# developer, but I'm currently working on a project in Python.</p>
<p>How can I represent the equivalent of an Enum in Python? </p>
| <p><a href="https://docs.python.org/3/library/enum.html" rel="noreferrer">Enums</a> have been added to Python 3.4 as described in <a href="http://www.python.org/dev/peps/pep-0435/" rel="noreferrer">PEP 435</a>. It has also been <a href="https://pypi.python.org/pypi/enum34" rel="noreferrer">backported to 3.3, 3.2, 3.1,... | <pre><code>def enum( *names ):
'''
Makes enum.
Usage:
E = enum( 'YOUR', 'KEYS', 'HERE' )
print( E.HERE )
'''
class Enum():
pass
for index, name in enumerate( names ):
setattr( Enum, name, index )
return Enum
</code></pre>
| 5,755 |
<p>I have a postgres database with a user table (userid, firstname, lastname) and a usermetadata table (userid, code, content, created datetime). I store various information about each user in the usermetadata table by code and keep a full history. so for example, a user (userid 15) has the following metadata:</p>
<pr... | <p>I suppose you're not willing to modify your schema, so I'm afraid my answe might not be of much help, but here goes...</p>
<p>One possible solution would be to have the time field empty until it was replaced by a newer value, when you insert the 'deprecation date' instead. Another way is to expand the table with an... | <p>A subselect is the standard way of doing this sort of thing. You just need a Unique Constraint on UserId, Code, and Date - and then you can run the following:</p>
<pre><code>SELECT *
FROM Table
JOIN (
SELECT UserId, Code, MAX(Date) as LastDate
FROM Table
GROUP BY UserId, Code
) as Latest ON
Table.UserI... | 4,484 |
<p>The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object instance. Although I know how to code the singleton pattern in C++ and Java, I was wondering if anyone know how to implement it in Ruby?</p>
| <p>Actually, the above answer was not completely correct.</p>
<pre><code>require 'singleton'
class Example
include Singleton
end
</code></pre>
<p>You also need to include the require 'singleton' statement.</p>
| <p>You could use modules to the same effect I believe, although its not "the singleton pattern" you can have global state that way (which is what a singleton is ! Naughty global state !).</p>
| 2,670 |
<p>What is a good data structure for storing phone numbers in database fields? I'm looking for something that is flexible enough to handle international numbers, and also something that allows the various parts of the number to be queried efficiently.</p>
<p><strong>Edit:</strong> Just to clarify the use case here: I... | <p>First, beyond the country code, there is no real standard. About the best you can do is recognize, by the country code, which nation a particular phone number belongs to and deal with the rest of the number according to that nation's format.</p>
<p>Generally, however, phone equipment and such is standardized so you... | <p>I would go for a freetext field and a field that contains a purely numeric version of the phone number. I would leave the representation of the phone number to the user and use the normalized field specifically for phone number comparisons in TAPI-based applications or when trying to find double entries in a phone d... | 6,332 |
<p>I've been looking into the viability of manufacturing a replacement part for a kitchen blender that has a broken part. I found <a href="https://all3dp.com/1/food-safe-3d-printing-abs-pla-food-safe-filament/" rel="nofollow noreferrer">this page that talks about what makes a print food safe</a>. One of the items menti... | <p>Food packaging needs to comply with regulations. One certification agency informing about these (and their service to certify for them) is <a href="https://www.tuv-sud.com/home-com/resource-centre/publications/e-ssentials-newsletter/food-health-e-ssentials/e-ssentials-3-2015/regulations-for-food-packaging-products-a... | <p>Yes you have to change brass nozzle it contains lead.
If you are planning to print in PLA don't do that because PLA filament we are using in 3D printer are not food safe it contains some nasty colour dyes which are not food safe. Consider some special food safe filaments available in market. I think extruder gears ... | 1,041 |
<p>I'd like to get the Tree icon to use for a homegrown app. Does anyone know how to extract the images out as .icon files? I'd like both the 16x16 and 32x32, or I'd just do a screen capture.</p>
| <p>In Visual Studio, choose "File Open..." then "File...". Then pick the Shell32.dll. A folder tree should be opened, and you will find the icons in the "Icon" folder.</p>
<p>To save an Icon, you can right-click on the icon in the folder tree and choose "Export".</p>
| <p>If you're on Linux, you can extract icons from a Windows DLL with <a href="https://github.com/muflone/gextractwinicons" rel="nofollow">gExtractWinIcons</a>.
It's available in Ubuntu and Debian in the <code>gextractwinicons</code> package.</p>
<p>This blog article has a <a href="http://ubuntugenius.wordpress.com/201... | 2,983 |
<p><strong>Thermal conductivity</strong> is how well a plastic conducts heat. Most plastics don't conduct heat very well at all, which is what allows them to be 3D printed. That being said, there are a lot of potential use cases for highly thermally conductive filament, assuming you could print them. A commonly discuss... | <p>All values are in W/(m*K).</p>
<ul>
<li>PLA: 0.13</li>
<li>HIPS: 0.20</li>
<li>ABS: 0.25</li>
<li>PETG: 0.29</li>
<li>PEEK: 0.25</li>
<li>PLA with copper: 0.25 (<a href="https://www.3dhubs.com/talk/t/thermal-conductivity-of-copper-based-filament-and-ceramic-resin/8798/7" rel="nofollow noreferrer">see discussion</a>... | <p>Trimet3d has a Nano diamond PLA with a claimed thermal conductivity 3-5 times that of PLA. The diamonds are sub-microscopic and smooth. See <a href="https://www.tiamet3d.com/product-page/ultra-diamond-pla-1kg" rel="nofollow noreferrer">https://www.tiamet3d.com/product-page/ultra-diamond-pla-1kg</a>
Primarily they se... | 1,471 |
<p>I am currently encountering a problem where under certain circumstances, the extruder stutters when it starts a new layer. I am printing on an Anycubic i3 Mega and am slicing with Cura 3.6.0. The problem seems to occur in the main part of prints, as well as in supports. However it seems to only occur after a retract... | <p>You retraction settings may be too high. Direct drive extruders require less retraction than Bowden style extruders. Typical retraction settings for direct drive are 1.5mm at 50mm/s and for Bowden, 4mm at 50mm/s. The speed usually makes more of a difference than distance beyond a certain point.</p>
<p>You can get a... | <p><em>Definition: <strong>Sparse layer fill</strong> (called stuttering by the OP)</em></p>
<hr />
<h2>Why a sparsely filled support structure... (at the support bottom)</h2>
<p>Support structures are added by Ultimaker Cura as the first part of the layer before it progresses to the rest of the print object. The botto... | 1,100 |
<p>3D Printing's <a href="https://3dprinting.stackexchange.com/election/1">First Pro-Tem moderator election</a> has come to a close, the votes have been tallied, and the new moderators is:</p>
<p><a href="https://3dprinting.stackexchange.com/users/5740"><img src="https://3dprinting.stackexchange.com/users/flair/5740.p... | <p>I like the expanded definitions, but there is probably an issue with some of the things you'd put into "just rough around the edges" portion of what you state.</p>
<p>For instance, "Print Services" are mentioned as far as on-topic and what is allowed. <em>To what extent are Print Services</em> on-topic and allowed?... | <p>I like the expanded definitions, but there is probably an issue with some of the things you'd put into "just rough around the edges" portion of what you state.</p>
<p>For instance, "Print Services" are mentioned as far as on-topic and what is allowed. <em>To what extent are Print Services</em> on-topic and allowed?... | 69 |
<p>I am curious if anyone have used UnderC, Cint, Cling, Ch, or any other C++ interpreter and could share their experience.</p>
| <p>There is <strong><a href="http://cern.ch/cling" rel="noreferrer">cling</a> Cern's project</strong> of C++ interpreter based on <a href="http://clang.llvm.org/" rel="noreferrer">clang</a> - it's <em>new approach</em> based on 20 years of experience in <em>ROOT cint</em> and it's quite stable and recommended by Cern g... | <p>There is a program called <a href="http://neugierig.org/software/c-repl/" rel="nofollow noreferrer">c-repl</a> which works by repeatedly compiling your code into shared libraries using GCC, then loading the resulting objects. It seems to be evolving rapidly, considering <a href="http://packages.ubuntu.com/lucid/i38... | 9,491 |
<p>I imagine everyone has seen code like:</p>
<pre><code>public void Server2ClientEnumConvert( ServerEnum server)
{
switch(server)
{
case ServerEnum.One:
return ClientEnum.ABC
//And so on.
</code></pre>
<p>Instead of this badness we could do somthing like:</p>
<pre><code>public enum ... | <p>Using almost the same example, you can achieve this directly in the enum:</p>
<pre><code>public enum ServerEnum
{
One = ClientEnum.ABC,
}
</code></pre>
<p>This has the benefit of not requiring Reflection, is easier to read (in my opinion), and overall requires less overhead.</p>
| <p>I would probably use struct as the type, and then throw an exception if it isn't an Enum type. I don't see how your (Type, string) option is any safer than using object or struct.</p>
| 6,129 |
<p>tried searching but couldn't find anything.
I do not have a 3d printer so can't really experiment on my own, which means that when I am going to order a 3d print I want to get it as good as possible. So, my question:</p>
<p>Do quality of geometry matters when 3d printing? Will 3d printer only print quads, or ngons ... | <p>There are a lot of factors to 3D printing parts that work and fit together. </p>
<p>A lot of it will be discovered by trial and error, but let's try to put you on the right path. </p>
<p>First your material is what matters the most. Specifically their coefficient of thermal expansion, i.e. how much can the plastic... | <p>I can't attest to the empirical data laid out in the first answer, but I've had to deal with a lot of components printed in two parts to be connected via design-incorporated channels. I always found that, as a reference, a box of width and length 0.98" will slide securely, but freely, into a square channel of width ... | 463 |
<p>I've been interacting with Amazon S3 through <a href="https://addons.mozilla.org/en-US/firefox/addon/3247" rel="noreferrer">S3Fox</a> and I can't seem to delete my buckets. I select a bucket, hit delete, confirm the delete in a popup, and... nothing happens. Is there another tool that I should use?</p>
| <p>It is finally possible to delete all the files in one go using the new Lifecycle (expiration) rules feature. You can even do it from the AWS console.</p>
<p>Simply right click on the bucket name in AWS console, select "Properties" and then in the row of tabs at the bottom of the page select "lifecycle" and "add rul... | <p>Use the amazon web managment console. With Google chrome for speed. Deleted the objects a lot faster than firefox (about 10 times faster). Had 60 000 objects to delete.</p>
| 4,693 |
<p>We're experimenting with various ways to throttle user actions in a <strong>given time period</strong>:</p>
<ul>
<li>Limit question/answer posts</li>
<li>Limit edits</li>
<li>Limit feed retrievals</li>
</ul>
<p>For the time being, we're using the Cache to simply insert a record of user activity - if that record ex... | <p>Here's a generic version of what we've been using on Stack Overflow for the past year:</p>
<pre><code>/// <summary>
/// Decorates any MVC route that needs to have client requests limited by time.
/// </summary>
/// <remarks>
/// Uses the current System.Web.Caching.Cache to store each client reques... | <p>Since the highly voted answers to this question are too old, I am sharing the latest solution which worked for me.</p>
<p>I tried using the Dynamic IP restrictions as given in an <a href="https://stackoverflow.com/a/584689/3085520">answer</a> on this page but when I tried to use that extension, I found that this ext... | 5,412 |
<p>This question may require migration to Meta.SE, as it could be a site-wide "bug", but I thought that I would test the waters here, to see if there is an obvious explanation.</p>
<p>I noticed that a question of mine had been modified, on April 16, by "Song Khmer" <strike>in the <a href="https://3dprinting.stackexcha... | <p>Regarding the "invisible modification", there is technically a modification made multiple times by the user <strong>Song Khmer</strong> (now destroyed). This user was posting nonsense to your question by copying text from your question and posting it as an answer.</p>
<p>The reason you probably did not see this in ... | <p>The Stack Exchange network is undergoing a transition to HTTPS for its sites, including 3D Printing SE.</p>
<p>This edit (from Community, it looks like), was probably scripted from SE Staff in attempt to fix content on Questions and Answers. Ultimately, I don't think this is worth migrating the SE Meta.</p>
| 40 |
<p>I have a 15x15 cm heating resistor from my current printer (printing area: 12x12 cm).</p>
<p>I would like to switch to a glass bed and to rework my printer to increase the printing area to 20 cm (22x22 cm glass plate).</p>
<p>Would it be possible to use the old heating resistor placed only in the centre? this way ... | <p>If you're using borosilicate glass (aka pyrex) then it won't crack. You can get squares of ~20x20 cheaply off aliexpress.</p>
<p>If you're using window glass, picture frame class etc then you might have issues with cracking, it will depend on lots of factors like the wattage of your heater and the temperature of th... | <p>The glass will be taking up the heat to slowly cover its full area.
That means two things:</p>
<ol>
<li>it will not crack as there is no thermal shock</li>
<li>it will put more pressure on the heater as there will be bigger heat absorption, so in an edge case, you could end-up with not getting a required temperatur... | 881 |
<p>I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data.</p>
<p>My stack is PHP on Apache against a MySQL backend.</p>
<p>Advice greatly appreciated!</p>
| <p>Any request that the AJAX calls in your pages can make can also be made by someone outside of the application. If done right, you will not be able to tell if they were made as part of an AJAX call from your webapp or by hand/other means.</p>
<p>There are two scenarios I can think of which you might be talking abou... | <p>Use sessions to ensure that any Ajax posts are done in an authenticated context. Think of your Ajax code as just another client to your server, it becomes easier to tackle authentication issues that way.</p>
| 5,932 |
<p>The RoR tutorials posit one model per table for the ORM to work.
My DB schema has some 70 tables divided conceptually into 5 groups of functionality
(eg, any given table lives in one and only one functional group, and relations between tables of different groups are minimised.)
So: should I design a model per conce... | <p>I cover this in one of my large apps by just making sure that the tables/models are conceptually grouped by name (with almost 1:1 table-model relationship). Example:</p>
<pre><code>events
event_types
event_groups
event_attendees
etc...
</code></pre>
<p>That way when I'm using TextMate or whatever, the model files... | <p>There may be a small number of cases where you can use the Rails standard single-table-inheritance model. Perhaps all of the classes in one particular functional grouping have the same fields (or nearly all the same). In that case, take advantage of the DRYness STI offers. When it doesn't make sense, though, use ... | 8,800 |
<p>Can anyone recommend software or a .NET library that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then.</p>
<p>I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email).</p>
| <p>I have done a great deal of work handling bounce emails and there different types. If you want to be absolutely sure that the email your looking at is indeed a bounce of a specific kind I highly recommend getting a good filter. I have worked with <a href="http://www.boogietools.com/" rel="noreferrer">Boogie Tools</a... | <p>Thanks for the answer, great!
I did some research myself and found <a href="http://www.advancedintellect.com/product.aspx?listnanny" rel="nofollow noreferrer">ListNanny</a> - also super simple to use and tells you the type of bounce. Will write some proof of concept and see which one I like better...</p>
| 2,884 |
<p>Let's say that on the C++ side my function takes a variable of type <code>jstring</code> named <code>myString</code>. I can convert it to an ANSI string as follows:</p>
<pre><code>const char* ansiString = env->GetStringUTFChars(myString, 0);
</code></pre>
<p>is there a way of getting</p>
<p><code>const wchar_t... | <p>If this helps someone... I've used this function for an Android project:</p>
<pre><code>std::wstring Java_To_WStr(JNIEnv *env, jstring string)
{
std::wstring value;
const jchar *raw = env->GetStringChars(string, 0);
jsize len = env->GetStringLength(string);
const jchar *temp = raw;
while ... | <p>Just use env->GetStringChars(myString, 0);
Java pass Unicode by it's nature</p>
| 9,356 |
<p>I'm new to 3D Printing. I've created this star from Blender3d. As far as I know, most printers require a flat bottom.</p>
<p>As you can see (blue line is Z-axis, red line is X-axis, green line Y-axis), the star doesn't have any flat sides or points.</p>
<p><a href="https://i.stack.imgur.com/Mh6Bw.png" rel="norefer... | <p>Typical FDM desktop 3D printers might struggle with this model as it requires you to either print large overhangs and use support structure (when printed laying down), or lacks a natural flat bottom surface to get good print adhesion (when printed upright). A couple of suggestions:</p>
<ol>
<li><p>Some FDM printers... | <p>Typical FDM desktop 3D printers might struggle with this model as it requires you to either print large overhangs and use support structure (when printed laying down), or lacks a natural flat bottom surface to get good print adhesion (when printed upright). A couple of suggestions:</p>
<ol>
<li><p>Some FDM printers... | 313 |
<p>I was thinking about obfuscating a commercial .Net application. But is it really worth the effort to select, buy and use such a tool? Are the obfuscated binaries really safe from reverse engineering?</p>
| <p>You may not have to buy a tool - Visual Studio.NET comes with a community version of Dotfuscator. Other free obfuscation tools <a href="http://twit88.com/blog/2007/09/15/free-net-obfuscation-tools/" rel="noreferrer">are listed here</a>, and they may meet your needs.</p>
<p>It's possible that the obfuscated binaries... | <p>Yes, we do. We use BitHelmet obfuscator. It's new, but it works really well.</p>
| 9,664 |
<p>Suppose you have two seperate ASP.NET Web Application projects that both need to use a common MasterPage.</p>
<p>What's the best way to share the MasterPage across projects without having to duplicate code? Preferably without having to resort to source control or file system hacks.</p>
| <p>I have trying to accomplish the same thing. I look into a couple of solutions but I think using a virtual directory is probably the best way to share master pages. </p>
<p>Here are a couple sources that you can look at. </p>
<ul>
<li><a href="https://blogs.msdn.microsoft.com/shahpiyush/2007/03/09/sharing-master-... | <p>Use <a href="http://msdn.microsoft.com/en-us/library/aa365680%28VS.85%29.aspx" rel="nofollow noreferrer">a symbolic link</a>:</p>
<blockquote>
<p>A symbolic link is a file-system object that points to another file
system object. The object being pointed to is called the target.
Symbolic links are transparent ... | 5,075 |
<p>I have a process in Linux that's getting a segmentation fault. How can I tell it to generate a core dump when it fails?</p>
| <p>This depends on what shell you are using. If you are using bash, then the ulimit command controls several settings relating to program execution, such as whether you should dump core. If you type</p>
<pre><code>ulimit -c unlimited
</code></pre>
<p>then that will tell bash that its programs can dump cores of any ... | <p>By default you will get a core file. Check to see that the current directory of the process is writable, or no core file will be created.</p>
| 3,859 |
<p>I've acquired all the parts to build a Reprap Prusa i3 rework, the only missing part is the frame. </p>
<p>I'm in doubt between a MDF cut (cheaper) or acrylic (more expensive), of course a cheaper one is my preferred option until I see any disadvantage on making it of wood. </p>
<p>I thought about variables like h... | <p>Generally speaking, MDF will weather OK. In areas of high humidity you might experience warpage, but you can mitigate that by sealing the surface with paint or varnish. However you will probably find that of the two materials, acrylic will be more stable over a few years.</p>
| <p>I want to add the following to the already direct and very good answer of @Dani Epstein. It does not answer your question, but hopefully may help many people who are reading the question when choosing between the two materials.</p>
<p>Acrylic is less stable and will probably wear off faster than a well-built MDF fr... | 95 |
<p>I set up a website to use SqlMembershipProvider as written on <a href="http://msdn.microsoft.com/en-us/library/ms998347.aspx" rel="nofollow noreferrer">this page</a>.</p>
<p>I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authen... | <p>I have checked the code over in the files you have sent me (thanks again for sending them through).</p>
<p><strong>Note: I have not tested this since I have not installed the database etc..</strong></p>
<p>However, I am pretty sure this is the issue.</p>
<p>You need to set the <em>MembershipProvider</em> Property fo... | <p>Have you checked that the redirect path is being sent to the login form? Off my head I think it is <strong>ReturnURL</strong>?</p>
| 8,735 |
<p>I know that default cron's behavior is to send normal and error output to cron's owner local email box.</p>
<p>Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ?</p>
| <p>You could chuck file redirection onto either the command shown or the actual command in the crontab for both stdout and stderr - like <code>command > /tmp/log.txt 2>&1</code> .</p>
<p>If you want several users to receive this log, you could insert a <code>MAILTO=nameofmailinglist</code> at the top of you ... | <p>The cron line is just like any other unix command line so you can redirect output to another program. Ie.</p>
<pre><code>* * * * * /path/my/command > /my/email/script 2&>1
</code></pre>
| 6,496 |
<p>Is there a one line function call that quits the program and displays a message? I know in Perl it's as simple as:</p>
<pre><code>die("Message goes here")
</code></pre>
<p>I'm tired of typing this:</p>
<pre><code>puts "Message goes here"
exit
</code></pre>
| <p>The <code>abort</code> function does this. For example:</p>
<pre><code>abort("Message goes here")
</code></pre>
<p>Note: the <code>abort</code> message will be written to <code>STDERR</code> as opposed to <code>puts</code> which will write to <code>STDOUT</code>.</p>
| <p>I've never heard of such a function, but it would be trivial enough to implement...</p>
<pre><code>def die(msg)
puts msg
exit
end
</code></pre>
<p>Then, if this is defined in some .rb file that you include in all your scripts, you are golden.... just because it's not built in doesn't mean you can't do it yours... | 4,920 |
<p>I started using rafts more often, to get better results with complex or fragile parts, but my Ender 3 consistently under-extrudes the initial outside line of the raft (for the first inch or two, where extrusion starts). </p>
<p>It is often very thin and does not adhere. This often leads to problems with the followi... | <p>In Ultimaker Cura you can select only one of the the build plate adhesion options skirt, brim or raft. You cannot select multiple options. </p>
<p>There is no option available in Ultimaker Cura to increase the outline count of the raft bed adhesion structure. Basically the raft exists of a line support structure as... | <p>It's not necessarily the case that the apparent underextrusion of a small portion of your raft is the root cause. ABS is notorious for shrinkage and peeling. As a start, you should have a full enclosure so as to maintain a warm environment while printing. </p>
<p>It's also quite possible that your bed is slight... | 1,083 |
<p>How should I load files into my Java application?</p>
| <p><strong>The short answer</strong></p>
<p>Use one of these two methods:</p>
<ul>
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResource(java.lang.String)" rel="noreferrer"><code>Class.getResource(String)</code></a></li>
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.... | <pre><code>public static String loadTextFile(File f) {
try {
BufferedReader r = new BufferedReader(new FileReader(f));
StringWriter w = new StringWriter();
try {
String line = reader.readLine();
while (null != line) {
w.append(line).append("\n");
... | 2,837 |
<p>My gut feel is that document based web services are preferred in practice - is this other peoples experience? Are they easier to support? (I noted that SharePoint uses Any for the "document type" in its WSDL interface, I guess that makes it Document based). </p>
<p>Also - are people offering both WSDL and Rest type... | <p>Document versus RPC is only a question if you are using SOAP Web Services which require a service description (<a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" rel="noreferrer">WSDL</a>). RESTful web services do not not use WSDL because the service can't be described by it, and the feeling is... | <p>BiranLy's answer is excellent. I would just like to add that document-vs-RPC can come down to implementation issues as well. We have found Microsoft to be Document-preferring, while our Java-based libraries were RPC-based. Whatever you choose, make sure you know what other potential clients will assume as well.</p>
| 2,745 |
<p>I'm having a "minor" stringing issue, where I'm only getting stringing in helpers/support and infill area.</p>
<p>Background: Calibrating printer with 1 roll of PLA. Still getting minimal stringing, but mainly, stringing in helpers/support and infill areas. Tried different temps, but didn't seem to affect ... | <p>If the problem occurs in or immediately following printing of support material, it's probably Cura's <em>Limit Support Retractions</em> option, which defaults to on. This is probably the single worst default Cura has, and it causes all sorts of problems - surface defects, difficult-to-remove support, underextrusion,... | <p>It would be great if you could add an image showing the stringing that occurs on the filled and helper/support part of the print. It's quite difficult to visualise what is happening/your problem.</p>
<p>I would assume that the density/fill of the print will be different for infill versus helper/support parts of the ... | 1,862 |
<p>I admit I know enough about COM and IE architecture only to be dangerous. I have a working C# .NET ActiveX control similar to this:</p>
<pre><code>using System;
using System.Runtime.InteropServices;
using BrowseUI;
using mshtml;
using SHDocVw;
using Microsoft.Win32;
namespace CTI
{
public interfac... | <p>First, your interface needs ComVisible(true) in order to be seen by the calling script (this is probably causing the error). </p>
<p>Second, add a .NETreference in your project to "Microsoft.mshtml". This will import the COM interfaces for various IE-related things (windows, HTML documents, etc.)</p>
<p>Then, yo... | <p>There a simple and cleaner way to do it:</p>
<pre><code>public void GetBrowser()
{
ShellWindows m_IEFoundBrowsers = new ShellWindows();
foreach (InternetExplorer Browser in m_IEFoundBrowsers)
{
webBrowser = (SHDocVw.WebBrowser) Browser;
... | 9,762 |
<p>I have an stl with multiple parts that I want to split up. Cura 15 had an option to "split object into parts" but I can't find that in cura 2.4. Did it get removed?</p>
| <p>I don't think this feature was implemented at all with Cura v2.x. </p>
<p>As the developers say on the v2.1 release, "Cura has been completely reengineered". </p>
<p>Finding proper changelog documentation appears to be pretty hard because they have not posted any actual changelogs except the "user friendly viewabl... | <p>I think they removed it because it was inefficient (pretty slow). Still, I just started 3D printing and was a bit disappointed a seemingly easy task needed an other software (Meshmixer) to be achieved.</p>
| 546 |
<p>There's plenty of them out there but none of them do what I would like them to do.</p>
<p>Most of them crash when opening a file or simply corrupt the data. Many don't run at all. It seems to me that most were written 3-4 years ago for AS2 .sols and no longer work with FP9/AS3 sols. I'd attempt to write my own usin... | <p>Use <a href="http://blog.coursevector.com/minerva" rel="noreferrer">minerva</a>. I've tried it, it works with every .sol I open it with.</p>
| <p>I'm confused, isn't the best editor for Flash 9 shared objects... Flash? It already has methods for loading, editing and saving them.</p>
<hr>
<p>So make the editor and put it on your website. You won't get any security errors from flash, and then just throw a password around it so regular people can't edit their ... | 8,965 |
<p>I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?</p>
| <p>You could use <a href="http://msdn.microsoft.com/en-us/library/system.string.split.aspx" rel="noreferrer" title="String.Split method msdn reference">String.Split method</a>.</p>
<pre><code>class ExampleClass
{
public ExampleClass()
{
string exampleString = "there is a cat";
// Split string o... | <p>If you are using C# 3.5 you could write an extension method to System.String that does the splitting you need. You then can then use syntax:</p>
<pre><code>string.SplitByMyTokens();
</code></pre>
<p>More info and a useful example from MS here <a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx" rel="nof... | 9,580 |
<p>In Java, say you have a class that wraps an <code>ArrayList</code> (or any collection) of objects. </p>
<p>How would you return one of those objects such that the caller will not see any future changes to the object made in the ArrayList? </p>
<p>i.e. you want to return a deep copy of the object, but you don't kno... | <p>Turn that into a spec:<br>
-that objects need to implement an interface in order to be allowed into the collection
Something like <code>ArrayList<ICloneable>()</code></p>
<p>Then you can be assured that you always do a deep copy - the interface should have a method that is guaranteed to return a deep copy. <... | <p>I suppose it is an ovbious answer:</p>
<p>Make a requisite for the classes stored in the collection to be cloneable. You could check that at insertion time or at retrieval time, whatever makes more sense, and throw an exception.</p>
<p>Or if the item is not cloneable, just fail back to the return by reference opti... | 4,962 |
<p>We are about to get a canned package in that has been modified to our needs. I'm part of the team setup to prepare tests for it. It has an Oracle back end and I believe it's written in C++ .NET.</p>
<p>My question is what free or open source testing tools would you recommend.</p>
<p>Thanks</p>
<p>Ken</p>
| <p>For regression testing of our applications I use a free tool called AutoHotKey <a href="http://www.autohotkey.com/" rel="nofollow noreferrer">http://www.autohotkey.com/</a>. It is simple, batch configurable, and can work for virtually any application you have. Not exactly designed for black box testing, but a good f... | <p>What do you expect from such a tool? I don't know of any tool that can arbitrarily test any piece of software.</p>
| 6,323 |
<p>As my first project, I'm trying to design a holder for glass vials, for a scientific application. The photo below shows the latest design iteration, and also shows the problem with it:</p>
<p><a href="https://i.stack.imgur.com/7vqSam.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/7vqSam.jpg" alt="vial ho... | <p>It looks like those clips are thin and need to bend pretty far to let the vial out. Try to make the clips thicker, but with a smaller clip to retain the vial so that it doesn't have to bend as much. </p>
<p>This is what I'm thinking, in beautiful MS-PAINT form:<br>
<a href="https://i.stack.imgur.com/evTyz.png" rel=... | <p>If you don't want your clip to break, you'll have to engineer in some form of flexibility in a strong part of your design. For example, right now it looks like the bases of the clips are sitting rather solidly on the underlying surface such that it can't move. I'd suggest that instead it might be better to have tw... | 225 |
<p>Using a thermoplastic MDF printer with a 0.4mm extruder nozzle, I frequently have trouble with the nozzle getting clogged.</p>
<p>I am not sure what's causing the clog, but my guesses are dust and/or burnt filament (from leaving the hot end on without extruding).</p>
<p>What can I do to prevent, or at least minimi... | <p>Different types of hotends and extruders can lead to different problems associated with clogging. Based on my personal experience the leading causes of clogs and jams are the following</p>
<ol>
<li>Foreign material in the nozzle (dirt, dust, low quality filament)</li>
<li>Mixing materials in the hotend (running ABS... | <p>First, you don't.</p>
<p>To reduce the likelyhood, use good plastics without contaminations. </p>
<p>Do not over heat the plastic, causes faster carbon build up.</p>
<p>Buy hand drills, mini drills to clear it.</p>
<p>Don't switch materials around a lot. Low temp plastic residue will cook when you switch to high... | 132 |
<h3>Update: Solved, with code</h3>
<p><a href="https://stackoverflow.com/questions/18585/why-cant-you-bind-the-size-of-a-windows-form-to-applicationsettings#19056">I got it working, see my answer below for the code...</a></p>
<h3>Original Post</h3>
<p>As Tundey pointed out in <a href="https://stackoverflow.com/question... | <p>I finally came up with a Form subclass that solves this, once and for all. To use it:</p>
<ol>
<li>Inherit from RestorableForm instead of Form.</li>
<li>Add a binding in (ApplicationSettings) -> (PropertyBinding) to WindowRestoreState.</li>
<li>Call Properties.Settings.Default.Save() when the window is about to clo... | <p>Well I have had a quick play with this and you are correct, while there is no way to directly <em>bind</em> the size of the form to AppSettings, you can add your own values and change the size on load.</p>
<p>I would perhaps recommend that if this is a common feature, you subclass Form and make it automatically pro... | 3,912 |
<p>Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a query returning the following.</p>
<pre><code>Action1 VIEW
Action1 EDIT
Action2 VIEW
Action3 VIEW
Action3 EDIT ... | <p>Remember that the MAX aggregate function will work on text as well as numbers. This query will only require the table to be scanned once.</p>
<pre><code>SELECT Action,
MAX( CASE data WHEN 'View' THEN data ELSE '' END ) ViewCol,
MAX( CASE data WHEN 'Edit' THEN data ELSE '' END ) EditCol
FROM t
GROU... | <p>I had a situation where I was parsing strings and the first two positions of the string in question would be the field names of a healthcare claims coding standard. So I would strip out the strings and get values for F4, UR and UQ or whatnot. This was great on one record or a few records for one user. But when I wan... | 4,408 |
<p>I have tried both of :</p>
<pre><code>ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes');
</code></pre>
<p>and also :</p>
<pre><code>php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes"
</code></pre>
<p>in the .htaccess file.</p>
<p>Both methods actually... | <p>It turned out the issue was related to a PHP bug in 5.2.5</p>
<p>Setting an "admin_flag" for include_path caused the include path to be empty in some requests, and Plesk sets an admin_flag in the default config for something or other. An update of PHP solved the issue.</p>
<p><a href="http://bugs.php.net/bug.php?i... | <p>Looks like you duplicated the current directory in your include path. Try removing one of the '.:' from your string.</p>
| 6,321 |
<p>I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is <code>varchar(50)</code>, but then I started to wonder.</p>
<p>Is it more appropriate to use something like th... | <p><a href="http://webarchive.nationalarchives.gov.uk/20100407120701/http://cabinetoffice.gov.uk/govtalk/schemasstandards/e-gif/datastandards.aspx" rel="noreferrer">UK Government Data Standards Catalogue</a> suggests 35 characters for each of Given Name and Family Name, or 70 characters for a single field to hold the F... | <p>The average first name is about 6 letters. That leaves 43 for a last name. :) Seems like you could probably shorten it if you like.</p>
<p>The main question is how many rows do you think you will have? I don't think varchar(50) is going to kill you until you get several million rows.</p>
| 5,035 |
<p>I've tried to do this several times with no luck. After reading <a href="https://stackoverflow.com/questions/1451/what-is-the-best-way-to-handle-multiple-permission-types#1477">this post</a>, it made me interested in doing this again. So can anyone tell me why the following doesn't work?</p>
<pre><code><?php
... | <p>Use the bitwise OR operator (|) to set bits, use the AND operator (&) to check bits. Your code should look like this:</p>
<pre><code><?php
$guest = 1;
$editor = 2;
$admin = 4;
$user = $editor;
if( $user & ($editor | $admin) ) {
echo "Test";
}
?>
</code></pre>
<... | <p>In my opinion this doesn't scale well. I haven't actually tried using it on a large scale project, but a CMS sounds way to complicated to use this on.</p>
| 3,787 |
<p>I have a Question class:</p>
<pre><code>class Question {
public int QuestionNumber { get; set; }
public string Question { get; set; }
public string Answer { get; set; }
}
</code></pre>
<p>Now I make an ICollection of these available through an ObjectDataSource, and display them using a Repeater bound t... | <p>You have to handle the postback event (button click or whatever) then enumerate the repeater items like this:</p>
<pre><code>foreach(RepeaterItem item in rptQuestions.Items)
{
//pull out question
var question = (Question)item.DataItem;
question.Answer = ((TextBox)item.FindControl("txtAnswer")).Text;
qu... | <p>Then what's the point in the Bind method (as opposed to the Eval method) if I have to bind everything back up manually on postback?</p>
| 7,573 |
<p>I wrote a piece of code to convert PHP's striplashes into valid Python [backslash] escapes:</p>
<pre><code>cleaned = stringwithslashes
cleaned = cleaned.replace('\\n', '\n')
cleaned = cleaned.replace('\\r', '\n')
cleaned = cleaned.replace('\\', '')
</code></pre>
<p>How can I condense it? </p>
| <p>Not totally sure this is what you want, but..</p>
<pre><code>cleaned = stringwithslashes.decode('string_escape')
</code></pre>
| <p>Python has a built-in escape() function analogous to PHP's addslashes, but no unescape() function (stripslashes), which in my mind is kind of ridiculous.</p>
<p>Regular expressions to the rescue (code not tested):</p>
<pre><code>p = re.compile( '\\(\\\S)')
p.sub('\1',escapedstring)
</code></pre>
<p>In theory that... | 3,437 |
<p>One of the articles I really enjoyed reading recently was <a href="http://blog.last.fm/2008/08/01/quality-control" rel="nofollow noreferrer">Quality Control by Last.FM</a>. In the spirit of this article, I was wondering if anyone else had favorite monitoring setups for web type applications. Or maybe if you don't be... | <p>Usually you'll use an <a href="http://www.google.com/search?q=HTTPHandler+ASP.NET&spell=1" rel="noreferrer">HTTP Handler</a> for this. Given a request for...</p>
<blockquote>
<p><a href="http://www.yoursite.com/sitemap.axd" rel="noreferrer">http://www.yoursite.com/sitemap.axd</a></p>
</blockquote>
<p>...your... | <p>Custom handler to generate the sitemap. </p>
| 3,077 |
<p>Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript?</p>
<p>I realize that this is possible using <a href="http://en.wikipedia.org/wiki/WinZip" rel="noreferrer">WinZip</a>,... | <p>There are VBA methods to <a href="http://www.rondebruin.nl/win/s7/win001.htm" rel="noreferrer">zip</a> and <a href="http://www.rondebruin.nl/win/s7/win002.htm" rel="noreferrer">unzip</a> using the windows built in compression as well, which should give some insight as to how the system operates. You may be able to ... | <p>There are both zip and unzip executables (as well as a boat load of other useful applications) in the UnxUtils package available on SourceForge (<a href="http://sourceforge.net/projects/unxutils" rel="nofollow noreferrer">http://sourceforge.net/projects/unxutils</a>). Copy them to a location in your PATH, such as 'c... | 5,009 |
<p>I've written a database generation script in <a href="http://en.wikipedia.org/wiki/SQL" rel="noreferrer">SQL</a> and want to execute it in my <a href="http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime" rel="noreferrer">Adobe AIR</a> application:</p>
<pre><code>Create Table tRole (
roleID integer Primary Key... | <p>I wound up using this. It is a kind of a hack, but it actually works pretty well. </p>
<p>The only thing is you have to be very careful with your semicolons. : D</p>
<pre><code>var strSql:String = stream.readUTFBytes(stream.bytesAvailable);
var i:Number = 0;
var strSqlSplit:Array = strSql.split(";");
for (i ... | <p>What about making your delimiter something a little more complex like ";\n" which would not show up all that often. You just have to ensure when creating the file you have a line return or two in there. I end up putting two "\n\n" into the creation of my files which works well.</p>
| 2,250 |
<p>Should you ever use protected member variables? What are the the advantages and what issues can this cause?</p>
| <blockquote>
<p>Should you ever use protected member variables? </p>
</blockquote>
<p>Depends on how picky you are about hiding state. </p>
<ul>
<li>If you don't want any leaking of internal state, then declaring all your member variables private is the way to go. </li>
<li>If you don't really care that subclasses ... | <p>For detailed info on .Net access modifiers <a href="https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1027680.html" rel="nofollow noreferrer">go here</a></p>
<p>There are no real advantages or disadvantages to protected member variables, it's a question of what you need in your sp... | 5,763 |
<p>Unit testing and ASP.NET web applications are an ambiguous point in my group. More often than not, good testing practices fall through the cracks and web applications end up going live for several years with no tests. </p>
<p>The cause of this pain point generally revolves around the hassle of writing UI automation... | <p>Unit testing will be achievable if you <strong>separate your layers</strong> appropriately. As Rob Cooper implied, <em>don't put any logic in your WebForm other than logic to manage your presentation</em>. All other stuff logic and persistence layers should be kept in separate classes and then you can test those ind... | <p>There have been tries on getting Microsoft's free UI Automation (included in .NET Framework 3.0) to work with web applications (ASP.NET). A german company called Artiso happens to have written a blog entry that explains how to achieve that (<a href="http://www.artiso.com/ProBlog/PermaLink,guid,1a01608b-e5fa-4ad9-8c4... | 3,913 |
<p>I currently print with a .4mm nozzle on my extruder, and my prints seem to come out fairly accurate; would I see much of a difference if I went to a .3mm?</p>
<p>What are the pros and cons of larger and smaller nozzle sizes?</p>
| <p>1) Smaller nozzle advantage: sharper "corners" (higher X and Y resolution)</p>
<p>2) Larger nozzle advantage: faster 3d printing (because you can print the shell faster as each perimeter can be thicker so you'll need less perimeters to be printed to get the same shell thickness. Same true for infill).</p>
<p>3) Sm... | <p>My understanding is that the only difference is your range that your layer height can be. For example, the optimal layer heights for a 0.4mm nozzle fall between 0.1-0.3mm. So, we can assume a smaller nozzle will yield a lower range. Keep in mind that varying sizes in the nozzle could produce complications more promi... | 187 |
<p>My scheduled reports in SQL server won't run. I checked the logs and found the job that was failing. The error message in the log was:</p>
<blockquote>
<p>'EXECUTE AS LOGIN' failed for the requested login 'NT AUTHORITY\NETWORK
SERVICE'. The step failed. </p>
</blockquote>
<p>I'm using SQL authentication for t... | <p>I found the answer here:
<a href="http://www.themssforum.com/SVCS/Unable-execute/" rel="nofollow noreferrer">http://www.themssforum.com/SVCS/Unable-execute/</a></p>
<p>Apperently there was something wrong with the login for 'NT AUTHORITY\NETWORK SERVICE' and it wouldn't run the jobs it owned properly. Anyone unders... | <p>Can you check the permissions for your Network Service account? Specifically make sure they have the "Act as part of the OS" permission. If I'm reading the error message correctly, it looks like the NT AUTHORITY\NETWORK SERVICE account failed to execute as a logged on user. It doesn't look like it ever got to the ... | 3,537 |
<p>Will I have to pay again? I have about 9 months left before renewal but my current provider doesn't offer many options / control panels.</p>
<p>Update: thanks for everyone's help - I've finally completed this now.</p>
<p>I had to:</p>
<ul>
<li>Ask my old registrar to "Unlock" the domain</li>
<li>Ask my old regist... | <p>This is how it works
Lets say you have 9 more months for your current domain to expire
you transfer the domain to GoDaddy (or to any other decent Registrar)
you will be charged the price (little more or equal) to the price of booking a new domain
BUT, you will have the domain for 9 months + one year (or the no. of y... | <p>There is a domain transfer procedure. It's kind of complex, since it's intended to keep people from stealing domains by transferring them to another registrar (like happened to <a href="http://en.wikipedia.org/wiki/Sex.com" rel="nofollow noreferrer">sex.com</a> back in the 90's). GoDaddy does a good job of talking... | 9,907 |
<p>I'm looking for some way to effectively hide inherited members. I have a library of classes which inherit from common base classes. Some of the more recent descendant classes inherit dependency properties which have become vestigial and can be a little confusing when using <em>IntelliSense</em> or using the classes... | <p>Override them like Michael Suggests <a href="https://stackoverflow.com/questions/1528/#1533">above</a> and to prevent folks from using the overridden (sp?) methods, mark them as obsolete:</p>
<pre><code>[Obsolete("These are not supported in this class.", true)]
public override void dontcallmeanymore()
{
}
</code><... | <p>You can use an interface</p>
<pre><code> public static void Main()
{
NoRemoveList<string> testList = ListFactory<string>.NewList();
testList.Add(" this is ok ");
// not ok
//testList.RemoveAt(0);
}
public interface NoRemoveList<T>
{
T t... | 2,388 |
<p>I am working on localization for a asp.net application that consists of several projects.</p>
<p>For this, there are some strings that are used in several of these projects. Naturally, I would prefer to have only one copy of the resource file in each project.</p>
<p>Since the resource files don't have an namespace... | <p>You can just create a class library project, add a resource file there, and then refer to that assembly for common resources.</p>
| <p>Some useful advice on how to manage a situation like this is available here:</p>
<p><a href="http://www.codeproject.com/KB/dotnet/Localization.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/dotnet/Localization.aspx</a></p>
| 6,010 |
<p>Has anyone used <a href="http://www.ayende.com/Blog/archive/2007/09/03/Rhino-Igloo-ndash-MVC-Framework-for-Web-Forms.aspx" rel="nofollow noreferrer">Rhino igloo</a> in a non-trivial project? I am curious if it's worth, what are its drawbacks, does it enhance testability a lot, is it easy to use. How would you compar... | <p>If you want, you can translate this VB.Net code to C#. The theory here is that you change the size of a tab in the control.</p>
<pre><code>Private Declare Function SendMessage _
Lib "user32" Alias "SendMessageA" _
(ByVal handle As IntPtr, ByVal wMsg As Integer, _
ByVal wParam As Integer, ByRef lParam As Inte... | <p>Don't the text boxes allow HTML usage? If that is the case, just use HTML to format the text into a table. Otherwise, try adding the text to a datagrid and then adding that to the form.</p>
| 9,782 |
<p>The product-group I work for is currently using gcc 3.4.6 (we know it is ancient) for a large low-level c-code base, and want to upgrade to a later version. We have seen performance benefits testing different versions of gcc 4.x on all hardware platforms we tested it on. We are however <em>very</em> scared of c-comp... | <p>The best quality control for gcc is the linux kernel. GCC is the compiler of choice for basically all major open source C/C++ programs. A released GCC, especially one like 4.3.X, which is in major linux distros, should be pretty good.</p>
<p>GCC 4.3 also has better support for optimizations on newer cpus.</p>
| <p>If you are interested in OpenMP then you will need to move to gcc 4.2 or greater. We are using 4.2.2 on a code base of around 5M lines and are not having any problems with it.</p>
| 5,238 |
<p>I have a MemoryStream with the contents of a Font File (.ttf) and I would like to be able to create a FontFamily WPF object from that stream <strong>WITHOUT</strong> writing the contents of the stream to disk. I know this is possible with a System.Drawing.FontFamily but I cannot find out how to do it with System.Win... | <p>There is a similar question <a href="https://stackoverflow.com/questions/44912480/c-sharp-wpf-how-to-load-a-fontfamily-from-a-byte-array">here</a>, which contains a supposed solution by converting a System.Drawing.FontFamily to a WPF font family, all in memory without any file IO:</p>
<pre><code>public static void L... | <p>The best approach I could think of, was to save the oldFont to a temp directory, and immediately load it using the newFont constructor that accepts a uri.</p>
| 6,616 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.