instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep.</p> <p>What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same as those relating to the good changes...
<p>You have two choices to do this.</p> <p>The Quick and Dirty is selecting your files (using <kbd>ctrl</kbd>) in Project Explorer view, right-click them, choose <code>Replace with...</code> and then you choose the best option for you, from <code>Latest from Repository</code>, or some <code>Branch</code> version. Afte...
<p>I have same problem but CleanUp eclipse option doesn't work for me.</p> <p>1) install TortoiseSVN <br> 2) Go to windows explorer and right click on your project directory<br> 3 Choice CleanUp option (by checking break lock option)<br></p> <p>It's works.</p> <p>Hope this helps someone.</p>
5,659
<p>I'm about to start a fairly Ajax heavy feature in my company's application. What I need to do is make an Ajax callback every few minutes a user has been on the page. </p> <ul> <li>I don't need to do any DOM updates before, after, or during the callbacks. </li> <li>I don't need any information from the page, just fr...
<p>If you don't want to create a blank page, you could call a IHttpHandler (ashx) file:</p> <pre><code>public class RSSHandler : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/xml"; string sXml = BuildXMLString(); /...
<p>You can also use WebMethods which are built into the asp.net ajax library. You simply create a static method on the page's codebehind and call that from your Ajax.</p> <p>There's a pretty basic example of how to do it <a href="https://web.archive.org/web/20200803212711/http://geekswithblogs.net/frankw/archive/2008/0...
4,691
<p>Is there a performant equivalent to the isnull function for DB2?</p> <p>Imagine some of our products are internal, so they don't have names:</p> <pre><code>Select product.id, isnull(product.name, "Internal) From product </code></pre> <p>Might return:</p> <pre><code>1 Socks 2 Shoes 3 Internal 4 Pants </code><...
<p>For what its worth, COALESCE is similiar but </p> <pre><code>IFNULL(expr1, default) </code></pre> <p>is the exact match you're looking for in DB2. </p> <p>COALESCE allows multiple arguments, returning the first NON NULL expression, whereas IFNULL only permits the expression and the default.</p> <p>Thus</p> <pre...
<p><code>COALESCE</code> function same <code>ISNULL</code> function Note. you must use <code>COALESCE</code> function with same data type of column that you check is null.</p>
9,079
<p>If you add a image to your browser's DOM, IE6 will not check its cache to see if it already downloaded the image but will, instead, re-retrieve it from the server. I have not found any combination of HTTP response headers (of the ensuing image request) to convince IE6 that it can cache the image: Cache-control, Ex...
<p>Maybe <a href="http://www.mister-pixel.com/index.php?Content__state=is_that_simple" rel="nofollow noreferrer">this</a> will work? (is the same behaviour like hovering on links with css background image)</p>
<p>A quick google mentions the "Expires" header, which you've already tried. Digging deeper, it mentions the ETag header:</p> <p><a href="http://mir.aculo.us/2005/08/28/internet-explorer-and-ajax-image-caching-woes" rel="nofollow noreferrer">http://mir.aculo.us/2005/08/28/internet-explorer-and-ajax-image-caching-woes...
8,801
<p>I just bought new TEVO Tarantula and tried to print xyz cube. I found that my cube's layer was shifted as showed in picture. How can I fix this ?</p> <p><a href="https://i.stack.imgur.com/u53fC.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/u53fC.jpg" alt="enter image description here"></a></p>
<p>From an electrical standpoint, a two-phase stepper motors (what most 3D printers use) works the same backwards and forwards, the phase just reverses. If you are stalling on only one direction, I would look to see if you have a mechanical bind in that direction. Generally a wiring issue will cause the motor to eith...
<p>Sounds like you are configured for NC switches but are using NO switches, causing them to invert their reported state. Issue a <strong>M119</strong> command and see if the endstop statuses are correct when none are triggered.</p>
773
<p>I'm trying to find a source control for my own personal use that's as simple as possible. The main feature I need is being able to read/pull a past version of my code. I am the only developer. I've looked at a lot of different version control systems, but they all seem way more complicated than I need. I need on...
<p><a href="http://subversion.tigris.org/" rel="nofollow noreferrer">Subversion</a> is great -- you can run the server yourself or use something like assembla.com to host your code (although that exposes it to the network).</p> <p>There are numerous gui applications like <a href="http://tortoisesvn.tigris.org/" rel="n...
<p>You should check <a href="http://www.cvsnt.org/" rel="nofollow noreferrer">CVSNT</a> as server and use any of the clients you would like (standalone or integrated with your IDE). There are plenty of them.</p>
7,223
<p>And/or: do I need one?</p> <p>I've recently started using FogBugz for my hobby projects, and I'm very happy with things so far. Having read more about it, especially the evidence-based scheduling, I'd like to start using it for my PhD as well. (Heh; something tells me my supervisors won't be opening tickets for me,...
<p>The official answer is no, there is not a dedicated Mac client, other than Safari :)</p> <p>There's a <a href="http://support.fogcreek.com/default.asp?W840" rel="nofollow noreferrer">command line version</a> that runs on Linux, Windows, and Mac.</p> <p>There are also plans for an iPhone version although I'm not te...
<p>I don't think there is any other such Mac tool. I've never found the web interface too bad personally.</p>
6,942
<p>Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005) as opposed to using the project/solution setup. For us, the way that the project/solutions work is not intuitive and leads to configuruation explosion when you are trying to tweak builds with specific compile time flags.</p> <...
<p>I've found some benefits to makefiles with large projects, mainly related to unifying the location of the project settings. It's somewhat easier to manage the list of source files, include paths, preprocessor defines and so on, if they're all in a makefile or other build config file. With multiple configurations, ...
<p>You can use nant to build the projects individually thus replacing the solution and have 1 coding solution and no build solutions.</p> <p>1 thing to keep in mind, is that the solution and csproj files from vs 2005 and up are msbuild scripts. So if you get acquainted with msbuild you might be able to wield the exist...
7,506
<p>Up till now, I've tended to scale my first layer according to the print quality, so a 0.12&nbsp;mm first layer for a 0.08&nbsp;mm print, and 0.28&nbsp;mm for a 0.2&nbsp;mm print.</p> <p>After changing to a PLA which isn't sticking well, I'm wondering if the first layer is best determined by the printer/tolerance/ma...
<p>Default settings for first layer height in Slic3r Prusa Edition print profiles regardless layer height is 0.2 mm.</p> <p>If you need to improve bed adhesion then try tips from this video <a href="https://www.youtube.com/watch?v=ShFaJ027pFs" rel="nofollow noreferrer">3D Prints not sticking anymore? Watch this! 3DP10...
<p>Layer height in my cura settings means that head of extruder will be going up at 0.3mmm, and how i know that? Because i measure few different settings with height of bed. When I set bed to -0.2mm, ike everybody is proposing on internet, and i started printing first layer, I did stop it and measure with precise calip...
1,003
<p>An odd issue that I have been trying to address in a project - my calls to WebClient.DownloadFileAsync seem to be getting ignored and no exceptions are being raised. So far I have been able to determine this might be due to destination folder not existing, but from the looks of the MSDN documentation for <a href="h...
<p>Here are a few more resources you should check out:</p> <ol> <li><p>This DevExpress WinForms control: <a href="http://www.devexpress.com/Products/NET/Controls/WinForms/Wizard/" rel="nofollow noreferrer">http://www.devexpress.com/Products/NET/Controls/WinForms/Wizard/</a></p></li> <li><p>A home-grown wizards framew...
<p>The easiest way to create a wizard dialog is to use one of the third-party versions available that handle all of the "hard stuff" (the page navigation, UI framework, etc.) for you. The one I like the most is from <a href="http://www.divelements.co.uk/net/" rel="nofollow noreferrer">Divelements</a>; they have both a ...
5,967
<p>The company has the traditional complex organizational structure, defining the amount of levels using the letter 'n' rather than an actual number. I will try and express the structure I'm trying to achieve in mono-spaced font: </p> <pre><code> Alice ,--------|-------,------,------, Bob Fred Jack ...
<p>Josh Smith has a excecllent CodeProject article about TreeView. Read it <a href="http://www.codeproject.com/KB/WPF/AdvancedCustomTreeViewLyt.aspx" rel="nofollow noreferrer">here</a></p>
<p>I did end up using tips from the linked article, which I'd already read through but didn't think would help me. </p> <p>The meat of it happens here, in a converter: </p> <pre><code>&lt;ValueConversion(GetType(ItemsPresenter), GetType(Orientation))&gt; _ Public Class ItemsPanelOrientationConverter Implements IVal...
9,536
<p>I understand that the <code>Ruby 1.8 AST</code> is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this <code>AST</code> in a <code>Ruby C<...
<p>A good starting point is probably to read the source of the <a href="http://rubyforge.org/projects/parsetree/" rel="nofollow noreferrer">ParseTree</a> library, which lets you get at and mess with the AST from ruby.</p>
<p>Thanks for the tip. You're right - <code>ParseTree</code> seems to be the only code out there with any manipulation of the AST going on, except that it's actually written in RubyInline. </p> <p>So, it's a strange mixture between Ruby and C code. Very interesting reading, though.</p> <p>The other reference of cours...
3,487
<p>I'm trying to get an event to fire whenever a choice is made from a <code>JComboBox</code>.</p> <p>The problem I'm having is that there is no obvious <code>addSelectionListener()</code> method.</p> <p>I've tried to use <code>actionPerformed()</code>, but it never fires.</p> <p>Short of overriding the model for th...
<p>It should respond to <a href="http://docs.oracle.com/javase/7/docs/api/java/awt/event/ActionListener.html" rel="noreferrer">ActionListeners</a>, like this:</p> <pre><code>combo.addActionListener (new ActionListener () { public void actionPerformed(ActionEvent e) { doSomething(); } }); </code></pre> ...
<p>I was recently looking for this very same solution and managed to find a simple one without assigning specific variables for the last selected item and the new selected item. And this question, although very helpful, didn't provide the solution I needed. This solved my problem, I hope it solves yours and others. Tha...
8,340
<p>My printer just stopped working. It seems like it's working perfectly, but it gives me an error whenever I move the Z-Axis (Error: Printer set into dry run mode until restart) then, the bed temperature appears to be at 293ºC when it's actually at 95ºC.</p> <p>I suspect that the bed wires short-circuited since they ...
<p>Following on from Harvey Lim's <a href="https://3dprinting.stackexchange.com/questions/3771/commercially-available-3d-printer-fume-and-ufp-extractor#answer-3977">answer</a>, to give a concrete example of a DIY filter, which uses active carbon, see <a href="https://web.archive.org/web/20200514160332/http://www.3dprin...
<p>To try to answer your question, I found these enclosures on <a href="https://www.3dprintclean.com/store-1/" rel="nofollow noreferrer">3DPrintClean</a>, by browsing the Ultimaker forum. I'm not sure it fits your needs since you did not give any details about which Ultimaker you have, nor the amount of money you are w...
553
<p>3D printing should be relatively safe, however, the inherent nature of 3D printers, with all of the heated parts, constitutes a fire risk. A well designed 3D printer should be designed to be as safe as possible, especially one used in the home... Yes, the recommendation is, when printing, to watch the 3D printer at ...
<p>Whether you should use a thermal fuse or not depends on what other safety measures you've taken. You can't look at the safety features of a printer in isolation, you need to look at what other measures are in place.</p> <p>The main fire hazard in printers is unfortunately (still) the fact that some manufacturers us...
<p>I haven't found a good way to flood the entire machine, including the electronics, with CO2 gas or another extinguisher when the alarm sounds.</p> <p>A servo or some other actuator attached to a fire extinguisher, and then attach it to a thermocouple or some other sensor. Maybe a knockoff Arduino, which the small ...
602
<p>I'm still fairly new to T-SQL and SQL 2005. I need to import a column of integers from a table in database1 to a identical table (only missing the column I need) in database2. Both are sql 2005 databases. I've tried the built in import command in Server Management Studio but it's forcing me to copy the entire table....
<p>Inserting won't do it since it'll attempt to insert new rows at the end of the table. What it sounds like your trying to do is add a column to the end of existing rows.</p> <p>I'm not sure if the syntax is exactly right but, if I understood you then this will do what you're after.</p> <ol> <li><p>Create the colum...
<p>insert into Test2.dbo.MyTable (MyValue) select MyValue from Test1.dbo.MyTable</p> <p>This is assuming a great deal. First that the destination database is empty. Second that the other columns are nullable. You may need an update instead. To do that you will need to have a common key.</p>
7,561
<p>We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step. </p> <p>Thanks in advance to all respondents.</p...
<p>A quick Google indicates that it's not really supported. There's more than a few folks out there trying to <a href="http://www.daniweb.com/forums/showthread.php?t=14877&amp;page=2&amp;highlight=javascript+print+landscape" rel="nofollow noreferrer">hack</a> <a href="http://home.tampabay.rr.com/bmerkey/examples/landsc...
<p>I was looking to do this same thing and found <a href="http://edacio.us/forum/comments.php?DiscussionID=39" rel="nofollow noreferrer">this</a> article. It looks particularly "hacky" and as the author points out, may invoke an active x warning in IE. Seems like a losing proposition to confuse the user with an active ...
5,785
<p>Has anyone got experience with the white framework?</p> <p><a href="http://www.codeplex.com/white" rel="noreferrer">www.codeplex.com/white</a> ?</p> <p>I'm thinking about using it for the next project for basic smoke tests of our windows client. I'd like some advice on articles or your own experiences. Thanks.</p>...
<p>I recently used white to build a few (20+) UI tests for a fairly complex WinForms app with plenty of UserControls, dynamically created and 3rd-party controls.</p> <p>Here are my impressions:</p> <ul> <li>Very easy and intuitive to work with.</li> <li>Little or no quality issues.</li> <li>It's a young project so th...
<p>I evaluated it recently, but had to reject it because it would not support the third party controls (janus grid) we were using.</p>
9,727
<p>When prototyping initial GUI functionality with a customer is it better to use a pen/paper drawing or to mock something up using a tool and show them that ?</p> <p>The argument against a tool generated design being that the customer can sometimes focus on the low-level specifics of the mock-up rather than taking a ...
<p>Always start with paper or paper-like mock-ups first. You do not want to fall into a trap of giving the impression of completeness when the back-end is completely hollow.</p> <p>A polished prototype or pixel-perfect example puts too much emphasis on the design. With an obvious sketch, you have a better shot of di...
<p>You can try out <a href="http://www.foreui.com/" rel="nofollow noreferrer">ForeUI</a>, it allow prototyping with different styles, what's more, it can make interactive prototype and run it in browser.</p>
2,580
<p>Is it possible in .NET to list files on a remote location like an URL? Much in the same way the System.IO classes work. All I need is the URLs to images that are on a remote server.</p>
<p><strong>Short answer:</strong> No, unless you have more control over that web-server</p> <p><strong>Long answer:</strong> Here are possible solutions...</p> <ol> <li><p>You will need server-side script that will do it locally and output this list in your preferred format.</p></li> <li><p>Most of the web-servers im...
<blockquote> <p>Is it possible in .NET to list files on a remote location like an URL?</p> </blockquote> <p>You should specify which protocol we're talking about.</p> <p>For HTTP, lubos hasko provided the answer: no. HTTP has no concept of files; only of resources. If you have control over the web server, you can a...
3,460
<p>I have a Visual Studio application with a splash screen image cut into "slices". The positions are specified in the Form Designer so they line up properly on the screen. However, the images are out of place when the application is run on the Chinese version of Windows XP. It looks as if the image slices were "explod...
<p>We found a solution! Apparently the picture boxes stretched out on the Chinese XP PC, but the images they contained did not. The fix was to add code like the following:</p> <pre><code>Me.PictureBoxIcon.Width = Me.PictureBoxIcon.Image.Width Me.PictureBoxIcon.Height = Me.PictureBoxIcon.Image.Height Dim loc As New Po...
<p>In the OnLoad event of the form, you could always explicitly set the location of each section. If starting at the top left with the first and assuming an array with the images in order:</p> <pre><code>images[0].Location = new Point(0,0); for (int i = 1; i &lt; images.Length; i++) { images[i].Location = new Point(...
9,185
<p>OpenSCAD has <code>rotate</code> function which rotates the body around its origin axis.</p> <p>Is there a way to specify an arbitrary axis?</p> <p>For example, this rotates a cylinder around its center:</p> <pre><code>rotate(a=[90,0,0]) { cylinder(h=10,r1=10,r2=10); } </code></pre> <p>How to make it rotate ar...
<p><code>rotate()</code> always rotates around the origin of the object following it. What you can do is to move your cylinder <em>away</em> from the origin, like this:</p> <pre><code>rotate(a=[90,0,0]) { translate([0,10,0]) cylinder(h=10,r1=10,r2=10); } </code></pre>
<p>You can use the following module in your code to achieve what you wish:</p> <pre><code>module myrotate(a, orig) { translate(orig) rotate(a) translate(-orig) children(); } myrotate([0,0,90], [0, 10, 0]) { cube([10, 10, 25]); } myrotate([0,0,-90], [0, 10, 0]) { cube([10, 10, 25]); } color([...
1,204
<p>When using MediaWiki's markup language, the only thing that I hate is creating numbered lists. The only way I know to create a list is to do something like this:</p> <pre><code>#Item1 #Item2 </code></pre> <p>However, if I want to add spaces or some other text between those lines, the numbering gets lost. For examp...
<p>Like this:</p> <pre><code>#Item1 #:Somestuff #Item2 </code></pre>
<p>You can do:</p> <pre><code># one # two&lt;br /&gt;spanning more lines&lt;br /&gt;doesn't break numbering # three ## three point one ## three point two </code></pre> <p>Regular old <code>&lt;br&gt;</code> works as well but probably pisses off someone.</p> <p>You can put additional HTML formatting in as well to do <co...
9,766
<p>I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference.<...
<p>In JavaScript, dates can be transformed to the number of milliseconds since the epoc by calling the <code>getTime()</code> method <strong>or</strong> just using the date in a numeric expression.</p> <p>So to get the difference, just subtract the two dates.</p> <p>To create a new date based on the difference, just ...
<pre><code>function checkdate() { var indate = new Date() indate.setDate(dat) indate.setMonth(mon - 1) indate.setFullYear(year) var one_day = 1000 * 60 * 60 * 24 var diff = Math.ceil((indate.getTime() - now.getTime()) / (one_day)) var str = diff + " days are remaining.." document.getEle...
6,336
<p>In C++, there isn't a de-facto standard logging tool. In my experience, shops roll their own. This creates a bit of a problem, however, when trying to create reusable software components. If everything in your system depends on the logging component, this makes the software less reusable, basically forcing any do...
<p>Yes. But dependency injection will help in this case.</p> <p>You can create an abstract logging base-class and create implementations for the logging-frameworks you want to use. Your components are just dependent on the abstract base-class. And you inject the implementations along with al their dependencies as need...
<p>If you are looking to build libraries which wont be recompiled, but want to provide a logging interface then perhaps a good way is to allow the user (of the library) to provide a callback.</p> <p>On initialising logging with your library, they would need to specify the callback, and then the glue-code is up to them...
6,035
<p>I have Carbide.c++ Developer from Nokia and I want to create applications for my S60 phone. I've looked at the samples that goes with the different SDK's for S60 but I haven't found any simple explanation on how strings, called descriptors, are used in Symbian.</p> <p>One of the problems are that I'm visually impai...
<p>Here are a few sites on blogspot that may help. They have RSS feeds that will hopefully be easier to consume than paging through PDFs.</p> <ul> <li><a href="http://descriptor-tips.blogspot.com/" rel="nofollow noreferrer">http://descriptor-tips.blogspot.com/</a></li> <li><a href="http://descriptors.blogspot.com/" r...
<p>The best advice regarding descriptors I give to any new Symbian developer in my company is to try and avoid using the descriptors when not necessary. The Symbian SDK has the libc API which includes stdio, stdlib, string and more. I usually use char* types and when necessary I convert it to a descriptor (when I need ...
5,919
<p>I just moved over to the Visual Basic team here at work.</p> <p>What is the equivalent keyword to <code>break</code> in Visual Basic, that is, to exit a loop early but not the method?</p>
<p>In both Visual Basic 6.0 and <a href="http://en.wikipedia.org/wiki/Visual_Basic_.NET" rel="noreferrer">VB.NET</a> you would use:</p> <ul> <li><code>Exit For</code> to break from For loop</li> <li><code>Wend</code> to break from While loop</li> <li><code>Exit Do</code> to break from Do loop</li> </ul> <p>depending ...
<p><code>Exit</code> [construct], and intelisense will tell you which one(s) are valid in a particular place.</p>
2,761
<p>I’ve been using Thingiverse pretty heavily since I started printing, and I frequently come across the same text block in unrelated models. Am I missing the joke or a hidden meaning in the frequent reuse of the following content?</p> <blockquote> <p>Designed up this dealer button to use in home games or have just as ...
<p>The &quot;dealer button&quot; text is the default text that Thingiverse inserts when you create a new Thing entry. If you get in a hurry and hit &quot;Publish Thing&quot; before you edit that, it'll go up for everyone to see with the &quot;dealer button&quot; default text still in place. Many times, when you see t...
<p>Consider this example: <a href="https://www.thingiverse.com/thing:4888256" rel="nofollow noreferrer">https://www.thingiverse.com/thing:4888256</a></p> <p>The text entered by the author is visible above the seemingly random text you mentioned in your question.</p> <p>Seeing how Thingiverse is a Makerbot product, it's...
1,989
<p>I am printing on a non-heated bed right now, but the question also applies to heated building plates. </p> <p>How often should you replace the glue layers that's supposed to be applied before printing? Some say you can do up to a few prints, such as in this <a href="https://ultimaker.com/en/community/19056-glue-sti...
<p>Depends on the glue and on your tolerance for messy undersides on your prints. It's fairly common for some of the glue to come off with the print. Or you may have marks from scrapers or rafts. Do you want to touch up that spot and have some artifacts on the bottom of the next print, or clean and redo the bed to get ...
<p>As noted in the answer to the other question you asked, the Flux Delta steel plate bed will handle multiple layers of glue. The determining factor regarding this particular printer and specific glue is how many ripples, bumps and/or lines you are willing to tolerate on the first layer of your prints. </p> <p>You'll...
311
<p>I am used to writing C# Windows applications. However, I have some free hosted PHP webspace that I would like to make use of. I have a basic understanding of PHP but have never used its object-oriented capabilities.</p> <p>Is there an easy way to convert C# classes to PHP classes or is it just not possible to write ...
<p>It is entirely possible to write a PHP application almost entirely in an object-oriented methodology. You will have to write some procedural code to create and launch your first object but beyond that there are plenty of MVC frameworks for PHP that are all object-oriented. One that I would look at as an example is <...
<p>I don't know about a tool to automate the process but you could use the Reflexion API to browse your C# class and generate a corresponding PHP class.</p> <p>Of course, the difficulty here is to correctly map C# types to PHP but with enough unit testing, you should be able to do what you want.</p> <p>I advice you t...
3,459
<p>I upgraded to a dual Mk9 extruder, and quickly discovered how critical it is to get the ends of both nozzles exactly level with each other -- that is, equally distant from the build plate at all times. Otherwise the lower one will crash against the plastic just extruded by the higher one.</p> <p>So, what's a good p...
<ol> <li>Make sure that the <strong>bed is level</strong>. As the saying goes, a level bed is next to godliness or something like that. Pay extra attention to the direction the nozzles are offset by (if one nozzle is offset on the X-axis, pay extra attention to the bed leveling along the X-axis). <a href="http://wiki.s...
<p>Another option, that I found was the simplest one that worked for me: </p> <ol> <li>Level your bed using just the first nozzle (temporarily lock the 2nd nozzle higher than the 1st one).</li> <li>Move the printhead at the center of the bed</li> <li>Loosen the grub screws on both nozzles (IMPORTANT, don't skip this s...
155
<p>When I am printing objects that have a lot of surface area on the first layer parts of that layer will rise up causing there to be gaps in the first layer. Here are two pictures. The first one was printing with a raft and the second one was without a raft.<a href="https://i.stack.imgur.com/yLnZA.jpg" rel="noreferrer...
<p>You got a few things happening. First that temp seems low. I am printing PLA at 215.. but there are a lot of factors. Start with a simple calibration thin wall test. Which is just a wall, no body. </p> <p>From there your bed could be closer. Maybe. I don't think that's really the issue. Slower speed and heat will m...
<p>I am having the same issue. I saw one similar post describe this as "baconing" and said it comes from over extrusion. Looking at the filament coming out I could imagine that if there is too much filament for the given travel speed, then it would buckle up. I tried decreasing the extrusion percentage. The Makerbot ...
537
<p>I'm writing some documentation in Markdown, and creating a separate file for each section of the doc. I would like to be able to convert all the files to HTML in one go, but I can't find anyone else who has tried the same thing. I'm on a Mac, so I would think a simple bash script should be able to handle it, but I...
<p>This is how you would do it in Bash. </p> <pre><code>for i in ./*.markdown; do perl markdown.pl --html4tags $i &gt; $i.html; done; </code></pre> <p>Of course, you need the <a href="http://daringfireball.net/projects/markdown/" rel="noreferrer">Markdown script</a>.</p>
<p>I use this in a .bat file:</p> <pre><code>@echo off for %i in (*.txt) python markdown.py "%i" </code></pre>
3,928
<p>I'm currently creating an explicit reference to this in the outer class so that I have a name to refer to in the anonymous inner class. Is there a better way to do this?</p>
<p>I just found this recently. Use <code>OuterClassName.this</code>.</p> <pre><code>class Outer { void foo() { new Thread() { public void run() { Outer.this.bar(); } }.start(); } void bar() { System.out.println("BAR!"); } } </code></pre> ...
<p>You can still use Outer.class to get the class of the outer class object (which will return the same Class object as Outer.this.getClass() but is more efficient)</p> <p>If you want to access statics in the enclosing class, you can use Outer.name where name is the static field or method.</p>
5,110
<p>I just read up on a performance of LINQ, and there is a HUGE amount to be gained by using Compiled LINQ.</p> <p>Now, why won't I always use compiled LINQ?</p>
<p>Short answer: when it's only going to happen once in a long time.</p> <p><a href="http://blogs.msdn.com/ricom/archive/2008/01/14/performance-quiz-13-linq-to-sql-compiled-query-cost-solution.aspx" rel="nofollow noreferrer">Long Answer</a>.</p>
<p>You should use it when some linq query is executing most of the time. Those can be converted to compiled lynq. Performance will be improved as execution path of query will be set at compile time. I used it in my project and performance went up a notched.</p>
2,962
<p>We have a question with regards to XML-sig and need detail about the optional elements as well as some of the canonicalization and transform stuff. We're writing a spec for a very small XML-syntax payload that will go into the metadata of media files and it needs to by cryptographically signed. Rather than re-inve...
<p>Within your overridden ProcessCmdKey how are you determining which key has been pressed?</p> <p>The value of keyData (the second parameter) will change dependant on the key pressed and any modifier keys, so, for example, pressing the left arrow will return code 37, shift-left will return 65573, ctrl-left 131109 and...
<p>I upvoted <a href="https://stackoverflow.com/questions/4850/c-and-arrow-keys/5026#5026">Tokabi's answer</a>, but for comparing keys there is some additional advice on <a href="https://stackoverflow.com/questions/1369312/c-keys-enumeration-confused-keys-alt-or-keys-rbutton-keys-shiftkey-keys-alt/2033796#2033796">Stac...
2,684
<p>I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too.</p> <p>Given that situation, I can't see a reason why I would ever choose to use shell scripting, vb ...
<p>Whatever you think will be most efficient for you!</p> <p>I had a co-worker who seemed to use a different language for every task; Perl for quick text processing, PHP for small internal web applications, .NET for our main product, cygwin for filesystem stuff. He preferred to use the technology which was most specif...
<p>Weigh the importance of the tool against popping open a text editor for a quick edit vs. opening IDE, recompiling, redeploying, etc.</p>
7,829
<p>Have just started using <code>Google Chrome</code>, and noticed in parts of our site, e.g. all the links on the page, are bright red. They should be black with a dotted underline.</p> <p>Is there some gotcha in <code>WebKit</code> rendering that turns all links red regardless of the style?</p>
<p>Are all of the resources that you're linking to in the present at the locations where your page is seeking them (verify this by actually checking it). I've also had an issue when checking an app in Safari where I was attempting to pull a file that wasn't there and I had very similar output to yours (red links).</p>...
<p>Have you set a <code>:visited</code> setting in your stylesheet?</p>
6,820
<p>I would like to print edible cookies or ornamentation for a cake.</p> <p>Is printing with edible materials achievable by standard thermoplastic-like 3D desktop printer? Or you need to buy a special printer to do that?</p>
<p>You cannot print edible models using a "standard" consumer 3D printer without first installing an "hot end" capable of depositing edible - normally thicker - substances as well as a suitable extruder mechanism. </p> <p>However, there are not necessarily any technical limitations in the electronics, software, slicer...
<p>You can, but that doesn't mean it's very easy.</p> <p>You don't have to buy a special printer, but you need a special extruder (such as <a href="http://www.structur3d.io/" rel="noreferrer">http://www.structur3d.io/</a>). Most of these systems can print anything with the consistency of Nutella. However, many parts o...
119
<p>I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA?</p>
<p>Yes.</p> <pre><code>ThisWorkbook.RefreshAll </code></pre> <p>Or, if your Excel version is old enough,</p> <pre><code>Dim Sheet as WorkSheet, Pivot as PivotTable For Each Sheet in ThisWorkbook.WorkSheets For Each Pivot in Sheet.PivotTables Pivot.RefreshTable Pivot.Update Next Next </code></...
<p>If you are using MS Excel 2003 then go to view->Tool bar->Pivot Table From this tool bar we can do refresh by clicking ! this symbol.</p>
9,638
<p>How do I delete untracked local files from the current working tree?</p>
<blockquote> <h2><a href="https://git-scm.com/docs/git-clean" rel="noreferrer">git-clean</a> - Remove untracked files from the working tree</h2> <h3>Synopsis</h3> <pre><code>git clean [-d] [-f] [-i] [-n] [-q] [-e &lt;pattern&gt;] [-x | -X] [--] &lt;path&gt;…​ </code></pre> <h3>Description</h3> <p>Cleans the working tre...
<p>I use this:</p> <ol> <li><code>git status</code></li> <li>copy the path of the file</li> <li><code>rm &lt;path of file&gt;</code></li> </ol> <p>My project has a lot of generated files created by a giant ANT build script. Using <code>git clean</code> would create chaos.</p>
8,634
<p><strong>Edit</strong>: Let me completely rephrase this, because I'm not sure there's an XML way like I was originally describing.</p> <p><strong>Yet another edit</strong>: This needs to be a repeatable process, and it has to be able to be set up in a way that it can be called in C# code.</p> <p>In database A, I h...
<p>I think the SQL Server utility <a href="http://weblogs.sqlteam.com/mladenp/archive/2007/03/03/60125.aspx" rel="nofollow noreferrer">tablediff.exe</a> might be what you are looking for.</p> <p>See also <a href="https://stackoverflow.com/questions/121243/hidden-features-of-sql-server">this thread</a>.</p>
<p>Dump the XML approach and use the import wizard / SSIS.</p>
8,392
<p>Half a year passed since <a href="https://3dprinting.meta.stackexchange.com/questions/430/tag-maintenance-summer-2019">Tag Maintenance Summer 2019</a>. A lot was done, some wasn't, so cleanup and rinse and repeat: Let's do some tag maintenance, especially regarding printers to make them easier to read. Use an answer...
<h1>Laundry list:</h1> <h2>Open</h2> <ul> <li><a href="https://3dprinting.meta.stackexchange.com/a/458/8884">Filled PLA</a></li> <li><a href="https://3dprinting.meta.stackexchange.com/a/459/8884">Repair vs. Maintenance</a></li> </ul> <h2>Done</h2> <ul> <li><a href="https://3dprinting.meta.stackexchange.com/a/456/8884">...
<h1>Manufacturer: E3D</h1> <p>Status: <strong>Done</strong>/split up</p> <p><a href="https://3dprinting.meta.stackexchange.com/a/438/8884">Takeover from Summer 2019</a></p> <p>We have a lot of questions tagged <a href="https://3dprinting.stackexchange.com/questions/tagged/e3d" class="post-tag" title="show questions tag...
73
<p>I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain skill sets synergize with each other, like data-driven web development and SQL expe...
<p>Ben, Almost all seasoned programmers are still students in programming. You never stops learning anything when you are a developer. But if you are really starting off on your career then you should be least worried about the specialization thing. All APIs, frameworks and skills that you expect that gives you a long ...
<p>Go as deep as you can starting off in one environment, win32, .net, Java, Objective C... whatever. </p> <p>It is important to build the deep understanding of how X works... so that you can translate the same concepts into other languages or platforms/environments, if you so desire. </p> <p>"Are there any areas o...
3,799
<p>I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like:</p> <pre><code>mvn install -Dmaven.repository=http://example.com/maven2 </code></pre> <p>The reason I want to do this is because I'm using a continuous ...
<p>You can do this but you're probably better off doing it in the POM as others have said.</p> <p>On the command line you can specify a property for the local repository, and another repository for the remote repositories. The remote repository will have all default settings though</p> <p>The example below specifies ...
<p>I am using <code>xmlstarlet</code> to achieve this. Tested for Maven 3 on CentOS 7, Maven 2 was not tested yet.</p> <pre class="lang-bash prettyprint-override"><code>XML_FULLPATH=&quot;$HOME/.m2/settings.xml&quot; MIRROR_ID='example' MIRROR_MIRROROF='*' MIRROR_NAME='Example Mirror' MIRROR_URL='http://example.com/mav...
9,645
<p>in our application we have a Java applet running inside a .NET browser control. It is a know issue from Sun that running an applet this way may crash the control.</p> <p>Has anyone come across the same problem and solved it?</p> <p>Atm we are running the applet in a Webbrowser but we need to run it in a browser co...
<p>After some time the problem solved itself. It was indeed a bug in the java runtime which is now fixed by sun. Just make sure your JRE is > 1.6.10.</p>
<p>If you wrote the applet and have source, then you could try to migrate the Java Applet to a J# Browser control and stuff that in your .net application. </p> <pre><code>Here is a link - http://msdn.microsoft.com/en-us/library/aa290083(VS.71).aspx </code></pre>
9,726
<p>I've only done a bit of Flex development thus far, but I've preferred the approach of creating controls programmatically over mxml files, because (and <em>please</em>, correct me if I'm wrong!) I've gathered that you can't have it both ways -- that is to say, have the class functionality in a separate ActionScript c...
<p>Don't be afraid of MXML. It's great for laying out views. If you write your own <em>reusable</em> components then writing them in ActionScript may sometimes give you a little more control, but for non-reusable views MXML is much better. It's more terse, bindings are extemely easy to set up, etc.</p> <p>However, bin...
<p>there is a way that I usually use to use mxml and action script together: All my mxml components inherit from a action script class where I add the more complex code. Then you can refer to event listeners implemented in this class in the mxml file.</p> <p>Regards,</p> <p>Ruth</p>
3,501
<p>Does anyone have any experience with a tool that generates test strings from a BNF grammar that could then be fed into a unit test?</p>
<p>I don't have an answer to the tool question, but I will say it is fairly easy in any text processing language (perl/python/etc) to randomly generate sentences from a BNF grammar, and slightly more verbose in a bigger language (Java/C/etc), but it shouldn't be too hard to roll your own.</p> <p>The problem with this,...
<p>If, say, you're developing a compiler, then you likely have an abstract syntax tree datatype. If so, then you could write a function to generate an random AST -- with that, you can print it to a string and feed that to your unit test. It's guaranteed to be a valid program this way, since you <em>started</em> with ...
7,541
<p>I am using MS Access 2003. I want to run a lot of insert SQL statements in what is called 'Query' in MS Access. Is there any easy(or indeed any way) to do it?</p>
<p>yes and no.</p> <p>You can't do:</p> <pre><code>insert into foo (c1, c2, c3) values ("v1a", "v2a", "v3a"), ("v1b", "v2b", "v3b"), ("v1c", "v2c", "v3c") </code></pre> <p>but you can do</p> <pre><code>insert into foo (c1, c2, c3) select (v1, v2, v3) from bar </code></pre> <p>What does that get y...
<p>Based on the VBA workaround from @Jonathan, and for execution in the current Access database:</p> <pre class="lang-vb prettyprint-override"><code>Public Sub InsertMinimalData() CurrentDb.Execute &quot;INSERT INTO FinancialYear (FinancialYearID) VALUES ('FY2019/2020');&quot; CurrentDb.Execute &quot;INSERT INTO Fi...
8,796
<p>I've successfully installed <code>mjpg-streamer-experimental</code> from <a href="https://github.com/jacksonliam" rel="nofollow noreferrer">jacksonliam</a>/<a href="https://github.com/jacksonliam/mjpg-streamer" rel="nofollow noreferrer"><strong>mjpg-streamer</strong></a>.</p> <p>I just can't figure out how to set th...
<p><strong>Edit: Having now installed Octopi myself, I have found that they made it easy to rotate the image right from the interface. If you open the &quot;Settings&quot; and look under &quot;Webcam &amp; Timelapse&quot;, there are settings for flipping the image horizontally or vertically and for rotating 90 degrees....
<p>From the <code>help</code> for input plugin &quot;<strong>raspicam</strong>&quot;, the following parameters can be passed to this plugin:</p> <pre><code>[-fps | --framerate]...: set video framerate, default 5 frame/sec [-x | --width ]........: width of frame capture, default 640 [-y | --height]........: height of fr...
715
<p>We're building a CMS. The site will be built and managed by the users in aspx pages, but we would like to create a static site of HTML's. The way we're doing it now is with code I found <a href="http://forums.asp.net/p/931180/1092188.aspx#1092188" rel="nofollow noreferrer">here</a> that overloads the Render method ...
<p>Calling the <code>Render</code> method is still pretty simple. Just create an instance of your page, create a stub <code>WebContext</code> along with the <code>WebRequest</code> object, and call the <code>Render</code> method of the page. You are then free to do whatever you want with the results.</p> <p>Alternativ...
<p>@ckarras: I would rather not use an external tool, because I want the HTML pages to be created programmatically and not manually.</p> <p>@jttraino: I don't have a time interval in which the site needs to be outputted- the uotput has to occur when a user creates a new site.</p> <p>@Frank Krueger: I don't really und...
8,017
<p>I picked up a roll of Overture matte black PLA, and the surface of both the filament and the printed object <em>feel like</em> paper. This made me wonder if it contains wood-based fibers like &quot;wood PLA&quot; does, and if so, whether it's abrasive and harmful to the nozzle. In the past I wouldn't have cared, but...
<p>You may be experiencing the feel of paper, which is typically a matte surface, when feel testing the printed item, as both would be matte. A search for your focus found one purchaser of this product (via Amazon) has <a href="https://www.amazon.com/ask/questions/asin/B089S2QDHD/2/ref=ask_dp_iaw_ql_hza?isAnswered=true...
<p>At least one filament manufacturer, Protopasta, documents their <a href="https://www.proto-pasta.com/collections/all/products/high-performance-htpla-matte-fiber" rel="nofollow noreferrer">&quot;matte fiber HTPLA&quot;</a> as &quot;containing plant fibers&quot; but also documents that</p> <blockquote> <p>Matte Fiber ...
2,105
<p>On my Reprap-like 3D printer, I routed all the wires to a spot near the base; for the motors, endstops, thermistors, etc, I plugged them all into a <a href="http://rads.stackoverflow.com/amzn/click/B00V7S79BW" rel="noreferrer">DB25 breakout board</a>, and that's working great.</p> <p>For my Extruder (12v), and my h...
<p>You might be able to use one of the connectors (Deans Ultra, EC3, XT-60/30, Bullet) that are normally used for RC models. They're made for very high currents. The XT60 connectors depicted below are rated for 60A continuous (well above what you'd need for any heated bed); their smaller XT30 cousins are good for 30A b...
<p>I agree with Tom's answer about RC connectors. Another good connector option worth considering is Anderson Powerpoles.</p> <ul> <li>They're "modular" so you can use them to assemble connectors with multiple wires.</li> <li>They crimp instead of solder (I really recommend the special crimping tool if you plan to use...
396
<p>The ASP page gets data uses that to draw a graph, I then need to save the image created to JPEG to be displayed on the browser and also used in PDF and other format. What is the best way to compress the image? I am currently porting a JPEG compression library to ASP but I think it will be too slow on this ARM device...
<p>Take a look at the Imaging APIs (start your traversal at the <a href="http://msdn.microsoft.com/en-us/library/aa452202.aspx" rel="nofollow noreferrer">IImagingFactory interface</a>). If your device has a JPG compression codec installed (remember that CE is modular, so it may or may not be present) you can use it to...
<p>I'm confused... </p> <p>The images from ASP would be compressed on the server side--not client side. </p> <p>I'm sure your web server is not running on Windows CE, so I don't think your concern is warranted.</p> <p><strong>EDIT:</strong> Seems as though you can run a web server on Windows CE: <a href="http://ww...
6,141
<p>I've been printing with my Ender 3 for a while now and it's been great. I've had very few problems - depending on my settings, these are my typical first layers:<a href="https://i.stack.imgur.com/GGhr1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GGhr1.jpg" alt="enter image description here"></...
<p>After watching it countless times, I found out that it was the magnetic mat on the bed that has worn out. It no longer adheres to the bed completely flat and some of the texture was worn down more than in other areas. It wasn't visually detectable - I found it by checking the nozzle height with various feeler gauges...
<p>When my printer suddenly started to underextrude, it was the fault of the extruder lever being broken and not pushing out enough material. Replacing the extruder for a metal version did fix it.</p> <p>Another common issues that can result in bad adhesion is a greasy or destroyed build surface. Such is fixed with cl...
1,514
<p>In WindowsForms world you can get a list of available image encoders/decoders with</p> <pre><code>System.Drawing.ImageCodecInfo.GetImageDecoders() / GetImageEncoders() </code></pre> <p>My question is, is there a way to do something analogous for the WPF world that would allow me to get a list of available </p> <p...
<p>You've got to love .NET reflection. I worked on the WPF team and can't quite think of anything better off the top of my head. The following code produces this list on my machine:</p> <pre><code>Bitmap Encoders: System.Windows.Media.Imaging.BmpBitmapEncoder System.Windows.Media.Imaging.GifBitmapEncoder System.Window...
<p>Hopefully someone will correct me if I'm wrong, but I don't think there's anything like that in WPF. But hopefully this is one of the many cases where advances in the technology have rendered obsolete the way we're used to doing things. Like "how do I wind my digital watch?"</p> <p>To my understanding, the reason...
3,578
<p>I may just be missing this functionality, but does anyone know if there is a widget available:</p> <p>I need to list the subject for all the entries that are associated with a given tag.</p> <p>For example: I have 5 articles tagged with "Tutorial", I'd like to see a list as follows:</p> <ul> <li>Tutorial 1: Insta...
<p>I don't think this is a concern.</p> <p>Yes, the mythical "somebody" can replace the implementation of MD5 with something insecure. But in order to do that, the mythical somebody must actually be able to get his code into the Ruby process. And if he can do that, then he presumably could also inject his code into a ...
<p>If someone monkeypatched an object or a module, then you need to look at 2 cases: He added a new method. If he is the only one adding this meyhod (which is very likely), then no problems arise. If he is not the only one, you need to see if both methods do the same and tell the library developer about this severe pr...
5,225
<p>What is the best solution of defaultButton and "Enter key pressed" for ASP.NET 2.0-3.5 forms?</p>
<p>Just add the "defaultbutton" attribute to the form and set it to the ID of the button you want to be the default. </p> <pre>&lt;form defaultbutton="button1" runat="server"&gt; &lt;asp:textbox id="textbox1" runat="server"/&gt; &lt;asp:button id="button1" text="Button1" runat="server"/&gt; &lt;/form&gt; </pre...
<p>Just add the "defaultbutton" attribute to the form and set it to the ID of the button you want to be the default. </p> <pre>&lt;form defaultbutton="button1" runat="server"&gt; &lt;asp:textbox id="textbox1" runat="server"/&gt; &lt;asp:button id="button1" text="Button1" runat="server"/&gt; &lt;/form&gt; </pre...
9,425
<p>I want to know what are the options to do some scripting jobs in windows platform. I need functionality like file manipulations, registry editing etc. Can files be edited using scripting tools? What other functionality does windows scripting tools offer? Can everything that can be done using the Windows GUI be done ...
<p>I think <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" rel="nofollow noreferrer">Windows PowerShell</a> from Microsoft is the current favourite for this sort of thing.</p>
<p>Yesterday I could have repaired this for you ;)</p> <blockquote> <p>What all are the tools/languages for windows shell scripting?</p> </blockquote> <p>Would read better as</p> <blockquote> <p>What tools and languages are available for windows shell scripting?</p> </blockquote>
5,204
<p>I found this question, <a href="https://3dprinting.stackexchange.com/questions/10010/laser-is-engraving-the-negative-space">laser is engraving the negative space</a> in the close queue this morning as being off topic. I was about to respond, and through I'd look at the community view on meta. I found this question...
<p><strong>I say allow them.</strong> </p> <p>To let you know what's out there, I work at <a href="http://hyrel3d.com" rel="nofollow noreferrer">Hyrel</a>. </p> <p>Our printers can take <a href="https://www.youtube.com/watch?v=B0lvN-aPYHI" rel="nofollow noreferrer">spindle (milling) heads and additional axes</a>, and...
<p>This is a tricky one, as 3d printers are starting to be bundled with lasers. Note those kits will totally blind you. 3d printers are being bundled with everything, really if you look at the things <a href="http://diabasepe.com/" rel="nofollow noreferrer">http://diabasepe.com/</a> is making. (Cool guys btw)</p> <p>H...
66
<p>Has anyone had any success running two different web servers -- such as Apache and CherryPy -- alongside each other on the same machine? I am experimenting with other web servers right now, and I'd like to see if I can do my experiments while keeping my other sites up and running. You could say that this isn't so ...
<p>You can't have two processes bound to the same port on the same IP address. You can add another IP address to the box and have each server listen on one.</p> <p>Another option is to proxy pass one server to the other. With Apache, you could do something like:</p> <pre><code>NameVirtualHost * &lt;virtualhost *&gt; ...
<p>Your best bet would be putting Apache httpd in front of port 80 and relay requests meant for other servers through Apache by using modules. Most popular scenario would be Tomcat behind Apache where you'll be able to run both php and jsp applications.</p> <p>I'm not familiar with CherryPy, so I can only suggest you ...
4,357
<p>I have a WCF service that gets called from client side JavaScript. The call fails with a Service is null JavaScript error. WebDevelopment helper trace shows that the calls to load the jsdebug support file results in a 404 (file not found) error. </p> <p>Restarting IIS or clearing out the Temp ASP.Net files or setti...
<p>Figured it out!</p> <p>Here is the services configuration section from web.config</p> <p>Look at the bindingConfiguration attribute on the endpoint. The value "webBinding" points to the binding name="webBinding" tag in the bindings and that is what tells the service to use Transport level security it HTTPS. In my ...
<p>If you still get the same error after all your possible work done. Just add a "AJAX Enabled WCF-Service".</p>
8,368
<p>While the C# spec does include a pre-processor and basic directives (#define, #if, etc), the language does not have the same flexible pre-processor found in languages such as C/C++. I believe the lack of such a flexible pre-processor was a design decision made by Anders Hejlsberg (although, unfortunately, I can't fi...
<p>Consider taking a look at an aspect-oriented solution like <a href="http://www.postsharp.org/" rel="noreferrer">PostSharp</a>, which injects code after the fact based on custom attributes. It's the opposite of a precompiler but can give you the sort of functionality you're looking for (PropertyChanged notifications ...
<p>If you are ready to ditch C# you might want to check out the <a href="http://boo.codehaus.org/" rel="nofollow noreferrer">Boo</a> language which has incredibly flexible <a href="http://boo.codehaus.org/Part+17+-+Macros" rel="nofollow noreferrer">macro</a> support through <a href="http://en.wikipedia.org/wiki/Abstrac...
5,790
<p>After I updated the firmware on my Prusa i3, the Bed won't switch off anymore. It worked perfectly before the update, but now, the moment I power up my printer, the LED on the bed turns on and it starts heating up. The manual control in Repetier Host doesn't turn if off or on and I even tried g-codes <code>M140 S0</...
<p>To answer the main question "Is ABS better for structural parts of a 3D printer as opposed to PLA".</p> <p>The answer, unfortunately is it depends.</p> <p>ABS has lower yield and ultimate strengths compared to PLA. This means that at room temperatures, ABS is weaker than PLA. However the difference between yield a...
<p>Actually, Both PLA and ABS could use for structural parts. PLA has high strength and is brittleness. ABS has better thermal resistance and durable. <a href="https://ecoreprap.com/pla-vs-abs/" rel="nofollow noreferrer">PLA and ABS</a> are the main types of 3D printing material, each has cons and pros.</p> <p>If you w...
585
<p>Besides "no connection", what other failure modes should I test for? How do I simulate a high-latency link, an unreliable link, or all the other sorts of crazy stuff that will undoubtedly happen "in the wild"? </p> <p>How about wireless applications? How do I test the performance in a less-than-ideal WL environme...
<blockquote> <p>To add to TimK's answer, if you have a router, test pulling the upstream link on the router, this will test a bad connection without your system knowing that you lost the physical link.</p> </blockquote> <p>Also if you plug it back in after a few seconds it's possible that the connection won't be los...
<p>You definitely want to test physically pulling the cable out. Lots of networking code will throw different exceptions in that scenario vs when the connection has just been lost.</p>
4,320
<p>Does anyone remember the <code>XMP</code> tag?</p> <p>What was it used for and why was it deprecated?</p>
<p>A quick Google search on W3C reveals that <code>XMP</code> was introduced for displaying <strong>preformatted text</strong> in HTML 3.2 and earlier. When W3C deprecated the <code>XMP</code> tag, it suggested using the <code>PRE</code> tag as a preferred alternative.</p> <p>Update: <a href="http://www.w3.org/TR/REC-...
<p>Still works to show raw html - if you use it in script, break the start tag.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>var stuff='&lt;xmp'+'&gt;this is shown as is&...
2,655
<p>Of course the best metric would be a happiness of your users.<br> But what metrics do you know for GUI usability measurements?<br> For example, one of the common metrics is a average click count to perform action. What other metrics do you know? </p>
<p>Jakob Nielsen has several articles regarding usability metrics, including one that is entitled, well, <a href="http://www.useit.com/alertbox/20010121.html" rel="nofollow noreferrer">Usability Metrics</a>:</p> <blockquote> <p>The most basic measures are based on the definition of usability as a quality metric:</p>...
<p>I just look at where I want users to go and where (physically) they are going on screen, I do this with data from Google Analytics.</p>
6,447
<p>I've just built my first 3D printer. It uses a Bowden setup. </p> <p>When I try to print the extruder starts fine, but after a few seconds the extruder motor start skipping and the nozzle is jammed. </p> <p>I tried a cold pull, but it didn't help. I removed the PTFE tube and tried to push the filament with my hand...
<p>Extruder clogging is, at its root, a matter of too much backpressure at the hotend. There are a number of more specific causes, but it very simply comes down to the fact that the printer cannot feed the filament through the hotend as fast as the extruder is pushing it in.</p> <p>Things to check, pretty much in the ...
<p>It is useful to diagnose your problem if you provide more information, specifically what material you are using and what temperature you are using on your hot end.</p> <p>Even without the above information, it is likely that the hot end temperature is too low. At a low setting, the filament in the nozzle will softe...
1,542
<p>Let's say you have a typical web app and with a file configuration.whatever. Every developer working on the project will have one version for their dev boxes, there will be a dev, prod and stage versions. How do you deal with this in source control? Not check in this file at all, check it with different names or do ...
<p>What I've done in the past is to have a default config file which is checked in to source control. Then, each developer has their own override config file which is excluded from source control. The app first loads the default, and then if the override file is present, loads that and uses any settings from the overri...
<p>We just keep the production config file checked in. It's the developer's responsibility to change the file when they pull it out of source safe for staging or development. This has burnt us in the past so I wouldn't suggest it.</p>
2,787
<p>I am hitting some performance bottlenecks with my C# client inserting bulk data into a SQL Server 2005 database and I'm looking for ways in which to speed up the process.</p> <p>I am already using the SqlClient.SqlBulkCopy (which is based on TDS) to speed up the data transfer across the wire which helped a lot, but...
<p>Here's how you can disable/enable indexes in SQL Server:</p> <pre><code>--Disable Index ALTER INDEX [IX_Users_UserID] SalesDB.Users DISABLE GO --Enable Index ALTER INDEX [IX_Users_UserID] SalesDB.Users REBUILD</code></pre> <p>Here are some resources to help you find a solution:</p> <p><a href="http://weblogs.sqlt...
<p>Yes your ideas will help.<br> Lean on option 1 if there are no reads happening while your loading.<br> Lean on option 2 if you destination table is being queried during your processing.</p> <p>@Andrew<br> Question. Your inserting in chunks of 300. What is the total amount your inserting? SQL server should be abl...
4,394
<p>I got a Wanhao Duplicator 6 printer branded as a Monoprice Ultimate about a year an and a half ago, 6 months after I got it I decided I hated the buildplate (I had to use a gluestick on every print to get it to stay down) so I removed the original fake buildtak, and got a piece of borosilicate glass and a sheet of P...
<p>Looking at the picture, the first thing that came to mind was, "are you sure it's the bed?". </p> <p>The height variance looks very regular, and while I'm unfamiliar with this printer's specific mechanics, my thought process trended to the Ender 3 and other v-wheel extruder mounts. If the extruder and gantry carria...
<p>From experience, my PEI sheet did not stay flat after multiple use, this may be causing the problems you are facing. It could be the adhesive is failing on different locations. </p> <p>As you mention, a new sheet of PEI may work for you; indeed the glass will not be necessary then, glueing it directly onto the alum...
1,501
<p>I know it is not recommended, but is it at all possible to pass the user's password to scp?</p> <p>I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a password and, no, I cannot easily change that to key-based authentication.</p>
<p>Use <a href="http://sshpass.sourceforge.net/" rel="noreferrer">sshpass</a>:</p> <pre><code>sshpass -p "password" scp -r user@example.com:/some/remote/path /some/local/path </code></pre> <p>or so the password does not show in the bash history</p> <pre><code>sshpass -f "/path/to/passwordfile" scp -r user@example.co...
<p>An alternative would be add the public half of the user's key to the authorized-keys file on the target system. On the system you are initiating the transfer from, you can run an ssh-agent daemon and add the private half of the key to the agent. The batch job can then be configured to use the agent to get the privat...
7,271
<p>I hope not everyone is using Rational Purify.</p> <p>So what do you do when you want to measure:</p> <ul> <li>time taken by a function</li> <li>peak memory usage </li> <li>code coverage</li> </ul> <p>At the moment, we do it manually [using log statements with timestamps and another script to parse the log and out...
<p>You probably want different tools for performance profiling and code coverage.</p> <p>For profiling I prefer Shark on MacOSX. It is free from Apple and very good. If your app is vanilla C you should be able to use it, if you can get hold of a Mac.</p> <p>For profiling on Windows you can use LTProf. Cheap, but not ...
<p>How are any tools going to work if your platform is a proprietary OS? I think you're doing the best you can right now</p>
8,068
<p>After building a Delta printer, I noticed that my whole prints are slightly tilted around the Z-axis in comparison to the slicer (e.g. Cura). There is no twist layer wise. This means, the prints themself look actually perfect. </p> <p>I just don't know what could be the reason of the rotation. I do not believe it i...
<p>I figured out that the reason is probably a slightly translated slider construction. Instead of using a proper centered slider as shown in <strong>red</strong>, I used a slider construction like illustrated in <strong>yellow</strong>. When all sliders are translated on each tower like this, the print should be tilte...
<p>If I am reading this correctly, your prints are being either stretched or your prints are shifting / leaning on more complicated prints. </p> <p>In this case, given that you are on a Delta printer, my answer is the same for all. I usually do Cartesian based 3d printing but the concept is the same for any drifting o...
1,077
<p>Backgrounder:</p> <p>The <a href="http://en.wikipedia.org/wiki/Opaque_pointer" rel="noreferrer">PIMPL Idiom</a> (Pointer to IMPLementation) is a technique for implementation hiding in which a public class wraps a structure or class that cannot be seen outside the library the public class is part of.</p> <p>This hi...
<p>I think most people refer to this as the <em>Handle Body</em> idiom. See James Coplien's book <em><a href="https://rads.stackoverflow.com/amzn/click/com/0201548550" rel="noreferrer" rel="nofollow noreferrer">Advanced C++ Programming Styles and Idioms</a></em>. It's also known as the <a href="http://en.wikipedia.org/...
<p>I don't know if this is a difference worth mentioning but...</p> <p>Would it be possible to have the implementation in its own namespace and have a public wrapper / library namespace for the code the user sees:</p> <pre><code>catlib::Cat::Purr(){ cat_-&gt;Purr(); } cat::Cat::Purr(){ printf("purrrrrr"); } </code...
8,548
<p>Shoes has some built in dump commands (Shoes.debug), but are there other tools that can debug the code without injecting debug messages throughout? Something like gdb would be great.</p>
<p>You can also use Shoes.show_log to automatically open a debug console.</p>
<p>I was a bit confused about the Apple-/ (or Alt-/) bit mentioned here. What I ended up doing was running <em>./shoes</em> with no arguments, which popped up the console, then started my app with <em>./shoes my_app.rb</em>. </p>
8,903
<p>You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.</p> <pre><code>myObject.property = YES; </code></pre> <p>or</p> <pre><code>[myObject setProperty:YES]; </code></pre> <p>Is there a difference in performance (in terms of accessing the property)? ...
<p>Dot notation for property access in Objective-C <strong>is</strong> a message send, just as bracket notation. That is, given this:</p> <pre><code>@interface Foo : NSObject @property BOOL bar; @end Foo *foo = [[Foo alloc] init]; foo.bar = YES; [foo setBar:YES]; </code></pre> <p>The last two lines will compile exa...
<p>As far as I've seen, there isn't a significant performance difference between the two. I'm reasonably certain that in most cases it will be 'compiled' down to the same code.</p> <p>If you're not sure, try writing a test application that does each method a million times or so, all the while timing how long it takes....
5,500
<p>My company is looking to start distributing some software we developed and would like to be able to let people try the software out before buying. We'd also like to make sure it can't be copied and distributed to our customers' customers.</p> <p>One model we've seen is tying a license to a MAC address so the softw...
<p>I'd suggest you take the pieces of information you want in the key, and hash it with md5, and then just take the first X characters (where X is a key length you think is manageable).</p> <p>Cryptographically, it's far from perfect, but this is the sort of area where you want to put in the minimum amount of effort w...
<p>It is difficult to provide a good answer without knowing anything about your product and customers. For enterprise software sold to technical people you can use a fairly complex licensing system and they'll figure it out. For consumer software sold to the barely computer-literate, you need a much simpler system.</p>...
7,228
<p>I have a large classic ASP app that I have to maintain, and I repeatedly find myself thwarted by the lack of short-circuit evaluation capability. E.g., VBScript won't let you get away with:</p> <pre><code>if not isNull(Rs("myField")) and Rs("myField") &lt;&gt; 0 then ... </code></pre> <p>...because if Rs("myField...
<p>Maybe not the best way, but it certainly works... Also, if you are in vb6 or .net, you can have different methods that cast to proper type too.</p> <pre><code>if cint( getVal( rs("blah"), "" ) )&lt;&gt; 0 then 'do something end if function getVal( v, replacementVal ) if v is nothing then getVal = replacem...
<p>Would that there were, my friend -- TernaryOp is your only hope. </p>
8,423
<p>X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions.</p> <p>Are there any consistent ways for writing such processes for Microso...
<p>Just to extend what Longhorn213 said, here's the code for it:</p> <pre><code>Using mysql as SqlCommand = new SqlCommand(sSql, cnInput) ' do stuff' End Using Using mysql as SqlCommand = new SqlCommand(otherSql, cnInput) ' do other stuff' End Using </code></pre> <p>(edit) Just as an FYI, using automatically wra...
<p>No, the garbage collector will find the old version of mySql and deallocate it in due course.</p> <p>The garbage collector should pick up anything that's been dereferenced as long as it hasn't been moved into the Large Object Heap.</p>
6,389
<p>I have a popup window containing a form which gathers data for a report. When I click submit in that window, I want it to close the popup, and open the report in the original window that called the popup.</p> <p>I think I can open the report in the correct window by using</p> <pre><code>{ :target =&gt; &lt;name of...
<p><code>:target =&gt;</code> adds the html attribute target to the link. This opens up a new window and names the new window the target.</p> <p>You have to use javascript or Ajax to redirect the old page,</p> <pre><code>window.opener.location.href="http://new_url"; </code></pre> <p>and then close the old window.</...
<p>How is <a href="http://railsforum.com/viewtopic.php?id=17785" rel="nofollow noreferrer">this</a> for starters?</p> <pre><code># The submit button in your child window's view: &lt;%= button_to_function 'Save', "$('my_form').submit(); window.opener.location.reload(); window.close();" %&gt; </code></pre>
5,669
<p>See the pictures below. I have a severe under extrusion when the printer starts the outer wall, which is resolved by the time it finishes the outer wall. It starts the layer in the same place every time, so it results in this vertical line, on one side of which is fine (where it finishes the layer) and the other sid...
<p>Based on other comments, answers, and question edits so far, in addition to your original question, I believe there are possibly two things going on here: incorrect retraction settings, including a misunderstanding of which settings are relevant and what they do, and issues related to slow acceleration. Both relate ...
<p>try retract before outer wall off.</p>
1,425
<p>I just set up a refurbished <a href="https://www.monoprice.com/product?p_id=29417" rel="nofollow noreferrer">MP Select Mini V2</a> and tried to print the test file included by the manufacturer, <code>cat.gcode</code>, from the included SD card. I printed in PLA (I think; the unlabeled sample included with the printe...
<p>Your trouble lies within the presliced G-code: the temperatures are rather low for PLA and upping both by 10 degrees would be advisable:</p> <ul> <li>200 °C for the Hotend</li> <li>60 °C for the Bed</li> </ul> <p>Atop that, printing a raft for PLA is usually not advisable.</p> <p>Get yourself a slicer (the most c...
<p>It looks to me as the model did not have enough surface contact with the raft.</p> <hr> <p>This can be caused by to big of a gap between raft and model set in the slicer or because of Underextrusion. The part itself does not look underextruded, at least not a lot, so I would say that the slicer settings were not ...
1,385
<p>We have made use of Passolo for a number of years, but it's kind of clunky and overpriced.</p> <p>It's got to be able to handle winforms and WPF....</p> <p>Are there any open source alternatives?</p>
<p>Coincidentally I saw this on MS Channel 9 this morning - Babylon.NET <a href="http://www.redpin.eu/" rel="nofollow noreferrer">http://www.redpin.eu/</a> Sadly I can't vouch for it as I haven't used it, but looks like a reasonable alternative to Passolo (well, at least it's cheaper).</p>
<p>Coincidentally I saw this on MS Channel 9 this morning - Babylon.NET <a href="http://www.redpin.eu/" rel="nofollow noreferrer">http://www.redpin.eu/</a> Sadly I can't vouch for it as I haven't used it, but looks like a reasonable alternative to Passolo (well, at least it's cheaper).</p>
9,446
<p>I use this question in interviews and I wonder what the best solution is.</p> <p>Write a Perl sub that takes <em>n</em> lists, and then returns 2^<em>n</em>-1 lists telling you which items are in which lists; that is, which items are only in the first list, the second, list, both the first and second list, and all ...
<p>Your given solution can be simplified quite a bit still.</p> <p>In the first loop, you can use plain addition since you are only ever ORing with single bits, and you can narrow the scope of <code>$bit</code> by iterating over indices. In the second loop, you can subtract 1 from the index instead of producing an unn...
<p>Here is my solution:</p> <p>Construct a hash whose keys are the union of all the elements in the input lists, and the values are bit strings, where bit <em>i</em> is set if the element is present in list <em>i</em>. The bit strings are constructed using bitwise or. Then, construct the output lists by iterating over...
9,387
<p>What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?</p>
<p>"OK" is a subjective judgement. You'll need to take a look at your client base and see what they're using.</p> <p>Having said that, I dropped support for Win2K over a year ago with no negative impact.</p>
<p>A lot of computers at my company use Win2k, so we couldn't really drop support. It all depends on the client base.</p>
3,290
<p>I have C# winforms application that needs to start an external exe from time to time, but I do not wish to start another process if one is already running, but rather switch to it.</p> <p>So how in C# would I so this in the example below?</p> <pre><code>using System.Diagnostics; ... Process foo = new Process(); ...
<p>This should do it for ya.</p> <p><a href="http://www.dreamincode.net/code/snippet1541.htm" rel="noreferrer">Check Processes</a></p> <pre><code>//Namespaces we need to use using System.Diagnostics; public bool IsProcessOpen(string name) { //here we're going to get a list of all running processes on //the c...
<blockquote> <p>Mnebuerquo wrote: </p> <blockquote> <p>Also, I had source code access to the process I was trying to start. If you can not modify the code, adding the mutex is obviously not an option.</p> </blockquote> </blockquote> <p>I don't have source code access to the process I want to r...
7,409
<p>A semaphore is a programming concept that is frequently used to solve multi-threading problems. My question to the community: </p> <p>What is a semaphore and how do you use it?</p>
<p>Think of semaphores as bouncers at a nightclub. There are a dedicated number of people that are allowed in the club at once. If the club is full no one is allowed to enter, but as soon as one person leaves another person might enter.</p> <p>It's simply a way to limit the number of consumers for a specific resource....
<p>A semaphore is a way to lock a resource so that it is guaranteed that while a piece of code is executed, only this piece of code has access to that resource. This keeps two threads from concurrently accesing a resource, which can cause problems.</p>
5,482
<p>So I am writing a registration form and I need the display name to be only numbers, letters and underscores. </p> <p>Have a look at my code and tell me what I'm doing wrong.</p> <pre><code>&lt;form method="post" action="/" onsubmit="return check_form()"&gt; &lt;input type="text" id="display-name" name="display...
<p>Your regex</p> <pre><code>/^([a-zA-Z0-9_])+/ </code></pre> <p>Looks for </p> <ol> <li>Start of string(check), followed by</li> <li>1 or more letters, numbers, or underscore (check)</li> </ol> <p>And then whatever comes after it doesn't matter. This regex will match anything at all so long as it begins with a let...
<p>By 'not working' I take it you mean it is letting invalid entries through (rather than not letting valid entries through).</p> <p>As @Annan has said, this would probably be due to the lack of the <code>$</code> character at the end of the expression, as currently it only requires a single valid character at the sta...
3,938
<p>I need to store some sensitive data by encrypting it with atleast 128 bit key. I investigated into javax.crypto package and found that there are certain Cipher names, like PBEWithMD5AndDES or PBEWithSHA1AndDESede which provides encryption upto 56 bit and 80 bit (<a href="http://en.wikipedia.org/wiki/DESede" rel="no...
<p>Use <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard" rel="nofollow noreferrer">Advanced Encryption Standard</a> (AES). It supports Key lengths of 128, 192, or 256 bits.</p> <p>The <a href="http://www.hoozi.com/Articles/AESEncryption.htm" rel="nofollow noreferrer">algorithm</a> is simple. The Sun ...
<p>I'm not a crypto expert by any means (so take this suggestion with a grain of salt), but I have used <a href="http://en.wikipedia.org/wiki/Blowfish_(cipher)" rel="nofollow noreferrer">Blowfish</a> before, and I think you can use it for what you need. There is also a newer algorithm by the same guy called <a href="h...
7,171
<p>I have a team lead who seems to think that business logic is very subjective, to the point that if my stored procedure has a <code>WHERE ID = @ID</code> — he would call this <em>“business logic”</em></p> <p>What approach should I take to define <em>“business logic”</em> in a very objective way without offending my ...
<p>I really think you just need to agree on a clear definition of what you mean when you say "business logic". If you need to be "politically sensitive", you could even craft the definition around your team lead's understanding, then come up with another term ("domain rules"?) that defines what you want to talk about....
<p>You could try to argue your point with a timed example, run a sql select against an indexed table and then run a loop to find exactly the same item in the same set but this time in code. The code will be much slower.</p> <p>Let the database do what it was designed to do, select sets and subsets of data :) I think r...
7,633
<p>Around 30% into a large print I had to cancel as the layers of the print were not full layers and looked very stringy. Here's a couple pictures of what it looked like.</p> <p><a href="https://i.stack.imgur.com/krwhC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/krwhC.jpg" alt="enter image descr...
<p>It appears that at a certain point, you're running into issues with the extrusion being a bit too viscous / melted causing it to over-deposit or string (fail to retract completely). It also looks like this issue gradually gets worse as you go. This really feels like nozzle over-heating to me.</p> <p><a href="https:...
<p>Try using 20 mm/s and 3.9 mm for your retraction and that should help. Also, what is your fan speed at?</p>
614
<p>Other than unrolling it and measuring it, is there a method for telling how much filament is left on a spool, for example calculating a length bases on weight or number of turns left on the spook?</p> <p>Is it possible to extract the amount of filament used from the printer's firmware?</p>
<p>If you have an empty spool of the same brand, you could weigh the empty spool and the one you're trying to &quot;measure&quot; to get an approximate weight of the remaining filament. Divide by the (presumably available from manufacturer) weight per meter to get a rough length in meters, if that's more useful to you...
<p>Besides using the window on a spool that estimates the amount of filament left, I've used large calipers to measure the diameter of an empty spool and the diameter of the filament left on the spool.</p>
2,109
<p>While I've seen rare cases where <em>private</em> inheritance was needed, I've never encountered a case where <em>protected</em> inheritance is needed. Does someone have an example?</p>
<p>People here seem to mistake Protected class inheritance and Protected methods.</p> <p>FWIW, I've never seen anyone use protected class inheritance, and if I remember correctly I think Stroustrup even considered the "protected" level to be a mistake in c++. There's precious little you cannot do if you remove that pr...
<p><a href="http://www.parashift.com/c++-faq-lite/" rel="nofollow noreferrer">C++ FAQ Lite</a> mentions of a case where using private inheritance is a legitimate solution (See <a href="http://www.parashift.com/c++-faq-lite/private-inheritance.html#faq-24.3" rel="nofollow noreferrer">[24.3.] Which should I prefer: compo...
5,178
<p>I have a form view, in the edit template I have two drop downs. Drop down 1 is explicitly set with a list of allowed values. It is also set to autopostback. Drop down 2 is databound to an objectdatasource, this objectdatasource uses the first dropdown as one of it's parameters. (The idea is that drop down 1 limits ...
<p>I had a similar problem with bound dropdownlists in a FormView. I worked around it by setting the selected value manually in the formview's "OnDataBound". </p> <p>(don't know where you get ConnectToProject_ID from)</p> <pre><code>FormView fv = (FormView)sender; DropDownList ddl = (DropDownList)fv.FindControl("Pr...
<p>Sounds like the controls aren't being databound properly after the postback.</p> <p>Are you databinding the first dropdown in the page or in the codebehind? If codebehind, are you doing it in on_init or on_load every time?</p> <p>There might be an issue of the SelectedValue of the second drop down being set to a n...
4,254
<p>I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one recommendation per answer)</p>
<p>The first and most dramatic performance problem that you can run into with NHibernate is if you are creating a new session factory for every session you create. Only one session factory instance should be created for each application execution and all sessions should be created by that factory.</p> <p>Along those ...
<p>What lotsoffreetime said.</p> <p>Read Chapter 19 of the documentation, "Improving Performance".<br> NHibernate: <a href="http://nhibernate.info/doc/nhibernate-reference/performance.html" rel="nofollow noreferrer">http://nhibernate.info/doc/nhibernate-reference/performance.html</a><br> Hibernate: <a href="http://doc...
9,268
<p>That's it. If you want to document a function or a class, you put a string just after the definition. For instance:</p> <pre><code>def foo(): """This function does nothing.""" pass </code></pre> <p>But what about a module? How can I document what a <em>file.py</em> does?</p>
<p>For the packages, you can document it in <code>__init__.py</code>. For the modules, you can add a docstring simply in the module file.</p> <p>All the information is here: <a href="http://www.python.org/dev/peps/pep-0257/" rel="noreferrer">http://www.python.org/dev/peps/pep-0257/</a></p>
<p>It's easy, you just add a docstring at the top of the module.</p>
6,572
<p>I'm having an amazing amount of trouble starting and stopping a service on my remote server from my msbuild script.</p> <p>SC.EXE and the ServiceController MSBuild task don't provide switches to allow a username/password so they won't authenticate, so I'm using RemoteService.exe from www.intelliadmin.com</p> <p>-A...
<p>Often, you can connect to the IPC$ "pseudo-share" on the machine to help establish the credentials before running commands like SC.EXE. Use a command like:</p> <pre><code>C:\&gt; net use \\xx.xx.xx.xx\ipc$ * /user:username </code></pre> <p>The <code>*</code> tells it to prompt you for the password.</p>
<p>If I understand your scenario correctly, it could help running the script with a domain account which is administrator on your remote machine (or better: has the right to start and stop the service).</p>
4,492
<p>I didn't see any similar questions asked on this topic, and I had to research this for something I'm working on right now. Thought I would post the answer for it in case anyone else had the same question.</p>
<p>I found the answer here: <a href="http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/" rel="noreferrer">http://blog.sqlauthority.com/2007/08/22/sql-server-t-sql-script-to-insert-carriage-return-and-new-line-feed-in-code/</a></p> <p>You just concatenat...
<p>In some special cases you may find this useful (e.g. rendering cell-content in MS Report ) <br>example:</p> <pre><code>select * from ( values ('use STAGING'), ('go'), ('EXEC sp_MSforeachtable @command1=''select ''''?'''' as tablename,count(1) as anzahl from ? having count(1) = 0''') ) as t([Copy_and_...
5,092
<p>Is there a difference between <code>NULL</code> and <code>null</code> in PHP? Sometimes they seem to be interchangeable and sometimes not.</p> <p>edit: for some reason when I read the documentation linked to in the answer (before posting this question) I read it as "case sensitive" instead of "case insensitive" whi...
<p>Null is case insensitive.</p> <p>From the <a href="http://ca3.php.net/manual/en/language.types.null.php" rel="noreferrer">documentation</a>:</p> <blockquote> <p>There is only one value of type null, and that is the <strong>case-insensitive</strong> keyword NULL.</p> </blockquote>
<p>Either will work. But the official PHP style guide, PSR-12, recommends lowercase.</p> <p><a href="https://www.php-fig.org/psr/psr-12/" rel="nofollow noreferrer">https://www.php-fig.org/psr/psr-12/</a>, Section 2.5</p>
3,034