instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>As a novice in practicing test-driven development, I often end up in a quandary as to how to unit test persistence to a database.</p>
<p>I know that technically this would be an integration test (not a unit test), but I want to find out the best strategies for the following:</p>
<ol>
<li>Testing queries. </li>
<li... | <p>Look into DB Unit. It is a Java library, but there must be a C# equivalent. It lets you prepare the database with a set of data so that you know what is in the database, then you can interface with DB Unit to see what is in the database. It can run against many database systems, so you can use your actual databas... | <p>I would also mock the database, and check that the queries are what you expected. There is the risk that the test checks the wrong sql, but this would be detected in the integration tests</p>
| 2,426 |
<p>The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty.</p>
<p>I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but installed from scratch. I generally treat this as a bit of a... | <p>Is Tools | Options | Environment | General | "items shown in recently used lists" set to a number greater than 0?</p>
| <p>Is Tools | Options | Environment | General | "items shown in recently used lists" set to a number greater than 0?</p>
| 8,271 |
<p>I've had my printer for almost a year now.</p>
<p>Is there something I should be doing to maintain the motors?</p>
| <p>The stepper motor itself does not. You may want to inspect the motors for debris or dust.</p>
<p>Depending on your configuration you may want to check on parts of your printer that connect to your stepper motor such as shaft couplings, pulleys, lead screws/threaded rods and belts. The stepper motor wires should o... | <p>No, stepper motors do not require maintenance. They are a brushless kind of motor, so they do not have brushes that need to be replaced.</p>
| 113 |
<p>I am looking for details of the VTable structure, order and contents, and the location of the vtable pointers within objects. </p>
<p>Ideally, this will cover single inheritance, multiple inheritance, and virtual inheritance.</p>
<p>References to external documentation would also be appreciated</p>
<p>Documentati... | <p>A virtual table is generally treated as an array of function pointers, although compilers are free to put data pointers (in MI and VI scenarios, or to typeinfos), integers (for fixups), or sentinel elements (such as NULL pointers) into it as well. The layout is generally compiler-specific (or ABI-specific where mul... | <p>Most of the compiler implementations that I have seen just "embed" the base object into the derived object. It becomes irrelevant where the vtable is kept because the relative offset into the object will just be added at compile time as references are evaluated. </p>
<p>Multiple and virtual inheritance are more com... | 9,610 |
<p>This is a somewhat low-level question. In x86 assembly there are two SSE instructions: </p>
<blockquote>
<p><code>MOVDQA <i><em>xmmi, m128</em></i></code></p>
</blockquote>
<p>and </p>
<blockquote>
<p><code>MOVNTDQA <i><em>xmmi, m128</em></i></code></p>
</blockquote>
<p>The IA-32 Software Developer's Manua... | <p>Non-Temporal SSE instructions (MOVNTI, MOVNTQ, etc.), don't follow the normal cache-coherency rules. Therefore non-temporal stores must be followed by an SFENCE instruction in order for their results to be seen by other processors in a timely fashion.</p>
<p>When data is produced and not (immediately) consumed agai... | <p>According to the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1: Basic Architecture,
"Programming with Intel Streaming SIMD Extensions (Intel SSE)" chapter:</p>
<p><strong>Caching of Temporal vs. Non-Temporal Data</strong></p>
<blockquote>
<p>Data referenced by a program can be tem... | 5,775 |
<p>This is probably <a href="http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/x13320.html" rel="noreferrer">a complex solution</a>.</p>
<p>I am looking for a simple operator like ">>", but for prepending.</p>
<p>I am afraid it does not exist. I'll have to do something like </p>
<pre>
mv myfile t... | <p>This still uses a temp file, but at least it is on one line:</p>
<pre><code>echo "text" | cat - yourfile > /tmp/out && mv /tmp/out yourfile
</code></pre>
<p>Credit: <a href="http://www.cyberciti.biz/faq/bash-prepend-text-lines-to-file/" rel="noreferrer">BASH: Prepend A Text / Lines To a File</a></p>
| <p>Bah! No one cared to mention about <em>tac</em>.</p>
<pre><code>endor@grid ~ $ tac --help
Usage: tac [OPTION]... [FILE]...
Write each FILE to standard output, last line first.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --befo... | 7,798 |
<p>I've been having this problem with my delta 3D printer where my nozzle isn't moving flat with my print bed (as if the bed is bent) but I have used the edge of my steel ruler and it seems to be perfectly flat. I have properly leveled my bed with a piece of paper and have checked the whole printer to make sure it's sq... | <p>In an earlier comment you stated that you cannot take it apart. So without taking it apart, you could try to determine the profile the old-fashion way with a piece of cardboard and a short pencil, just cut the rough shape of the rod and place it onto the rod, then take the short pencil and draw the profile onto the ... | <p>You could pull it apart and have it 3d scanned if you want to know the exact dimensions. There are companies that can do that for you at a certain price. Our company has used such services in scanning various parts before we obtained our own laser scanning device. </p>
<p>The question is whether you want exactly th... | 908 |
<p>I am just starting to learn javascript, so I don't have the skills to figure out what I assume is a trivial problem.</p>
<p>I'm working with a Wordpress blog that serves as a FAQ for our community and I am trying to pull together some tools to make managing the comments easier. <a href="https://stackoverflow.com/u... | <p>In Firefox, you could do something like this:</p>
<pre><code>javascript:alert(
document.getSelection().match(/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/g)
.join("\n"))
</code></pre>
<p>How this works:</p>
<ul>
<li>Gets the selection text from the browser ("document.getSelection()" in FF, in IE it would be "docum... | <p><a href="http://javascript.about.com/library/blip.htm" rel="nofollow noreferrer">Here</a> is a good article on obtaining the IP address of your visitors. You could display this in addition to their comment if you wanted or include it as a label or field in your page so you can reference it later.</p>
| 9,852 |
<p>I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on.</p>
<p>Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go <em>Menu->Build->Build Code... | <p>Actually it's in the project properties. Build tab, Output section, XML documentation file, and enter the filename. It will be built on every build of the project.</p>
<p>After that you can build the actual help with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E82EA71D-DA89-42EE-A715-696E3A487... | <p>The original NDoc project (mentioned by others) is dead, but there is a new project called <a href="https://sourceforge.net/projects/ndoc3/" rel="nofollow noreferrer">NDoc3</a>.</p>
<p>NDoc3 supports .NET 2.0 - 3.5. It is currently available as a beta version and worked great for me. I'm not sure if the project is... | 7,498 |
<p>We have a lot of open discussions with potential clients, and they ask frequently about our level of technical expertise, including the scope of work for our current projects. The first thing I do in order to gauge the level of expertise on staff they have now or have previously used is to check for security vulnera... | <p>I would say that surprising people by suddenly penetration-testing their software may bother people if simply for the fact that they didn't know ahead of time. I would say if you're going to do this (and I believe it's a good thing to do), inform your clients ahead of time that you're going to do this. If they seem ... | <p>I think the problem with this would be, that it would be quite hard to do checks on XSS without messing up their site. Also, things like SQL injection could be quite dangerous. If you stuck with appending selects, you might not have too much of a problem, but then the question is, how do you know it's even executin... | 7,617 |
<p>In C# I can use the FileSystemWatcher object to watch for a specific file and raise an event when it is created, modified, etc.</p>
<p>The problem I have with this class is that it raises the event the moment the file becomes created, even if the process which created the file is still in the process of writing. I ... | <p>You can use a file system watcher to check when the file has been changed. It only becomes "changed" after whichever program had the file previously closes the file. I know you asked for C#, but my VB.Net is much better. Hope you or someone else can translate.</p>
<p>It tries to open the file, if it isn't availab... | <p>Not sure if there is a way of an event actually being raised by the standard class, but I eas experiencing similar problems on some recent work I was doing.</p>
<p>In short, I was trying to write to a file that was locked at the time. I ended up wrapping the write method up so it would automatically try the write a... | 4,404 |
<p>OK, here is my problem, without being too specific for reasons of being fired for putting company practices on the internet.</p>
<p>There are spreadsheets made. These are uploaded to the database. I need to filter out duplicates from uploading. The only way to do this is by making sure that for each and every entry... | <p>I had a similar problem. My solution was to:</p>
<ol>
<li>import into a staging-table. </li>
<li>delete the duplicates</li>
<li>copy what's left over into the live table</li>
</ol>
<p>It's a little BFI, but it just plain works.</p>
| <p>How are you loading them into the database? Is this with your own code to read the Excel files? You can <a href="https://stackoverflow.com/questions/15828/reading-excel-files-from-c#15839">read the Excel files using ADO/ADO.NET with the right connection string</a>. Then you could read the data using a query that wou... | 4,272 |
<p>I just completed my first print on my Ender-3 and when the print finalized itself the nozzle didn't elevate itself to clear away from the piece. I watched as the nozzle slowly lowered itself into my print and destroy it. Here is the gcode generated by Slic3r used:</p>
<pre>
; Filament-specific end gcode
G4 ; wait
M... | <p>You are using <strong>incorrect commands</strong> in your end-code for the <strong>incorrect tool</strong> with respect to the print head raise.</p>
<p>Slic3r has no knowledge of the maximum printer height (as in variable <code>max_print_height</code>) because there is <strong>no input field to specify this</strong... | <p>Your print end code should have read something akin to this:</p>
<pre><code>; Filament sy end gcode
G4 ; wait
M221 S100
M106 S0 ; turn off cooling fan
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
; End code
G1 F1800 E-3 ; retract 3 mm
G1 Z30 ; Move print head up 30mm
G28 X0 ; home x and y axis
M84 ; disable ... | 1,203 |
<p>I recently (a few days ago) installed .NET 3.5 SP1 and subsequently an aspnet_client folder with a bunch of Crystal Reports support code has been injected into my .net web apps.</p>
<p>Anybody else experienced this?
Am I correct in saying that this is a side effect of SP1?
What is this?</p>
| <p>No it is a side effect of Crystal Reports. If you don't need it, remove it from your computer it is nothing but a headache. It is safe to delete the aspnet_client folder.</p>
| <p>What do you need to remove? It keeps on adding that folder back to the project that I'm working on...</p>
| 3,447 |
<p>Printer: Elegoo Mars 3 LCD Resin printer</p>
<p>The letter height is about 3 mm.</p>
<p>I engraved a word (text) on the side of a cylinder (which is about 14 mm in diameter and 4 mm in height). I am not sure about the exact depth of the engraving (but should be about 0.5 mm but that's not important).</p>
<p>The tex... | <p>No, at least not at a consumer level. The layering created by the printing process would create imperfections, and clear resin frequently yellows if not cured properly and then protected form strong UV light. Resins that do not yellow tend to have a blue cast to them.</p>
<p>You would be better off using a commercia... | <h1>Clear Resin isn't clear everywhere</h1>
<p>Any light-curing resin has a specific bandwidth to which it is totally opaque just to be able to cure. This is typically a blue color, but at this and adjacent wavelength, the lens will not allow light to pass through it, no matter if you can manage to get imperfections do... | 2,154 |
<p>I'm running Apache on Linux within VMWare.</p>
<p>One of the PHP pages I'm requesting does a <code>sleep()</code>, and I find that if I attempt to request a second page whilst the first page is <code>sleep()'ing</code>, the second page hangs, waiting for the <code>sleep()</code> from the first page to finish.</p>
<p... | <p>It could be that the called page opens a session and then doesn't commit it, in this case see <a href="https://stackoverflow.com/questions/498477/php-serving-one-page-at-a-time/498497#498497">this answer</a> for a solution.</p>
| <p>Are you actually seeing the CPU go to 100% or just that no other pages are being served? How many apache-instances are you runnning? Are they all stopping when you run sleep() in of of the threads?</p>
<p>PHP's sleep() function essentially runs through an idle loop for n seconds. It doesn't release any memory, but ... | 4,157 |
<p>I'd like to ignore multiple wildcard routes. With asp.net mvc preview 4, they ship with:</p>
<pre><code>RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
</code></pre>
<p>I'd also like to add something like:</p>
<pre><code>RouteTable.Routes.IgnoreRoute("Content/{*pathInfo}");
</code></pre>
<p>but tha... | <p>There are two possible solutions here.</p>
<ol>
<li><p>Add a constraint to the ignore route to make sure that only requests that should be ignored would match that route. Kinda kludgy, but it should work.</p>
<pre><code>RouteTable.Routes.IgnoreRoute("{folder}/{*pathInfo}", new {folder="content"});
</code></pre></l... | <p>This can be quite tricky.</p>
<p>When attempting to figure out how to map route data into a route, the system currently searches top-down until it finds something where all the required information is provided, and then stuffs everything else into query parameters.</p>
<p>Since the required information for the rou... | 5,019 |
<p>I am facing problem with an Oracle Query in a .net 2.0 based windows application. I am using <code>System.Data.OracleClient</code> to connect to oracle database. Name of database is <code>myDB</code>. Below the the connection string I am using:</p>
<pre><code>Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PRO... | <p>This looks like an issue with name resolution, try creating a public synonym on the table:</p>
<p>CREATE PUBLIC SYNONYM <em>MyTempTable</em> for <em>MyTempTable</em>;</p>
<p>Also, what exactly do you mean by <strong>wrong result</strong>, incorrect data, error message?</p>
<hr>
<p>Edit: What is the name of the s... | <p>Try adding</p>
<pre><code>CONNECT_DATA=(SID=myDB)(SERVICE_NAME=ORCL)
</code></pre>
<p>in the connection string.</p>
| 5,890 |
<p>We need to get data out of some Hyperion cubes (databases) using SSIS. Are there any connection managers available for this? Has anyone done this? </p>
| <p>There are some third party connectors out there. Don't think any exist from oracle or microsoft.</p>
| <p>I don't have any experience with Hyperion, but can you make use of the Script Task in SSIS?</p>
| 9,698 |
<p>I just got the Ender 5 Plus with BLTouch set up today. I was having some massive issues and determined that my leveling was off because the BLTouch was flashing red and not connecting. When I turn on the printer there is about a 50% chance that it will probe correctly by deploying the pin and correctly retracting it... | <p>I have used a standard soldering iron to modify and fix 3D prints in the past. You have to keep some things in mind when doing so:</p>
<ul>
<li>Don't overheat your material. PLA can take a soldering iron of about 230 °C before charring.</li>
<li>Don't use a tip with solder, or you will get grey deposits in the plast... | <p>Cutting materials with a 'hot knife' isn't anything new. There should be a fairly established toolset for working foam. For 3D prints, I prefer to add coatings rather than modify surfaces with a hand held tool after. I do run a drill bit through printed holes though.</p>
| 1,913 |
<p>I am thinking of using a PHP framework called <a href="http://codeigniter.com/" rel="noreferrer">CodeIgniter</a>. </p>
<p>One of the things I am interested in is its speed. I have, however, no way to find out how fast it is, and would rather not simply take the word of their website for it. Does anybody know how I ... | <p>Code Igniter also has some built-in benchmarking tools:
<a href="http://codeigniter.com/user_guide/general/profiling.html" rel="noreferrer">http://codeigniter.com/user_guide/general/profiling.html</a></p>
| <p>CodeIgniter is plenty fast for most projects. Some have posted here and if you Google, you will find that it compares favorably to other frameworks with respect to speed.</p>
<p>I would agree with another poster that performance is usually not a big concern when it comes to framework choice. The major frameworks al... | 3,425 |
<p>I've got the following PLA filament that is not feeding correctly into our Ultimaker 2+</p>
<p>It starts to feed and then all of the sudden, the wire 'eats' (read <em>breaks, but not entirely</em>) the plastic filament as you can see on the picture below:</p>
<p><a href="https://i.stack.imgur.com/OnQy7.jpg" rel="n... | <p>The photograph and your description indicate that the drive gear is eating the filament because the filament has stopped moving. The least likely problem would be that something is jammed at the spool or between the spool and the entry to the drive mechanism.</p>
<p>The more likely problem is that your nozzle is cl... | <p>I had a clogged filament. I heated up to 240 C, and pushed a wire up through the nozzle. It took some effort, and much patience is expected. I left the wire inside, as it helped soften the PLA. Then I pushed the filament by hand from top. After some efforts, the needle moved, indicating the movement of the PLA clog... | 609 |
<p>I'm trying to do something like the following:</p>
<pre><code>enum E;
void Foo(E e);
enum E {A, B, C};
</code></pre>
<p>which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it", but I can't understand why. Can anyone explain?</p>
<p>Clarification 2: I'm doing... | <p>The reason the enum can't be forward declared is that, without knowing the values, the compiler can't know the storage required for the enum variable. C++ compilers are allowed to specify the actual storage space based on the size necessary to contain all the values specified. If all that is visible is the forward... | <p>Because the enum can be an integral size of varying size (the compiler decides which size a given enum has), the pointer to the enum can also have varying size, since it's an integral type (chars have pointers of a different size on some platforms for instance).</p>
<p>So the compiler can't even let you forward-dec... | 9,689 |
<p>How can I check the existence of an element in jQuery?</p>
<p>The current code that I have is this:</p>
<pre><code>if ($(selector).length > 0) {
// Do something
}
</code></pre>
<p>Is there a more elegant way to approach this? Perhaps a plugin or a function?</p>
| <p>In JavaScript, everything is 'truthy' or 'falsy', and for numbers <code>0</code> means <code>false</code>, everything else <code>true</code>. So you could write:</p>
<pre><code>if ($(selector).length)
</code></pre>
<p>You don't need that <code>>0</code> part.</p>
| <p>Use the following syntax to check if the element actually exists using jQuery.</p>
<pre><code>let oElement = $(".myElementClass");
if(oElement[0]) {
// Do some jQuery operation here using oElement
}
else {
// Unable to fetch the object
}
</code></pre>
| 5,089 |
<p>I need to convert an x12 850 v4010 to a x12 940 v4010. Most of the tools convert from x12 to xml then I would need to map the xml to a 940. I am hoping there is a tool that could convert from one edi document to another.</p>
<p>EDIT FOR INFORMATION:</p>
<blockquote>
<p><a href="http://www.rawlinsecconsulting.com... | <p>Going to give Altova MapForce and Stylus Studio® a try. </p>
<p><a href="http://www.altova.com/downloadtrialmapforce3.html" rel="nofollow noreferrer">http://www.altova.com/downloadtrialmapforce3.html</a></p>
<p><a href="http://www.stylusstudio.com/xml_product_index.html" rel="nofollow noreferrer">http://www.stylus... | <p>I would like to try out ALTOVA's mapforce tool to convert EDI 850 X12 to Oracle Apps. Is this a good choice.
I hear that the most popular is <a href="http://www.sterlingcommerce.com/" rel="nofollow noreferrer">http://www.sterlingcommerce.com/</a>, but it is very costly..</p>
<p>Please advice
Shashi</p>
| 9,221 |
<p>What options do I have to publish Flash video from webcams other than Adobe's Flash Media Server and Red5? I would prefer a solution in .NET, Python or PHP but can't find anything.</p>
| <p>Besides another commercial product, like <a href="http://www.wowzamedia.com/" rel="nofollow noreferrer">Wowza Media Server</a>, you could go with a CDN (Content Delivery Network), like <a href="http://www.limelightnetworks.com/" rel="nofollow noreferrer">Limelight Networks</a> or <a href="http://www.voxel.net/" rel=... | <p>It looks like WebOrb can do it: <a href="http://www.themidnightcoders.com/weborb/dotnet/faq.shtm" rel="nofollow noreferrer">WebOrb FAQ</a> (last entry)</p>
<blockquote>
<p>Can I stream Flash video to a Flex/Flash client through WebORB?
Yes, WebORB supports FLV video streaming. An example is included with the We... | 6,581 |
<p>How can I specify the filename when dumping data into the response stream?</p>
<p>Right now I'm doing the following:</p>
<pre><code>byte[] data= GetFoo();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(data);
Response.End();
</code></pre>
<p>Wi... | <p>Add a content-disposition to the header: </p>
<pre><code>Response.AddHeader("content-disposition", @"attachment;filename=""MyFile.pdf""");
</code></pre>
| <pre><code> Response.AddHeader("Content-Disposition", "attachment;filename=" & FileName & ";")
</code></pre>
| 9,974 |
<p>I accidentally let the print head of my Anet A8 crash into one of 2 clips that are holding a glass sheet onto the hot bed, and suddenly the screen went blank and the printer rebooted, then it started reading 739°C from the extruder thermistor. I tried changing the thermistor, but that didn't have any effect. Also tr... | <blockquote>
<p>and found out it has a resistance of 1.5kΩ, while it should have a resistance of 4.7kΩ, so I suspect this is the main reason behind this high reading. Now the only thing left to figure out is how the resistance of this resistor changed.</p>
</blockquote>
<p>You can't measure the resistance of a resis... | <blockquote>
<p>and found out it has a resistance of 1.5kΩ, while it should have a resistance of 4.7kΩ, so I suspect this is the main reason behind this high reading. Now the only thing left to figure out is how the resistance of this resistor changed.</p>
</blockquote>
<p>You can't measure the resistance of a resis... | 761 |
<p>You can easily use the <code>PropertyChanges</code> events to set the flag. But how do you easily reset it after a save to the <code>ObjectContext</code>?</p>
| <p>For your specific example, there is no need to worry about it. Web browsers perform typographical rendering and place the correct amount of space between periods and whatever character follows (and it's different depending on the next character, according to kerning rules.)</p>
<p>If you want line breaks, <br/&g... | <p>You'd better use white-space: pre-wrap than white-space: pre or &nbsp;
With your example, the latter solutions can start a new line on "rules.&nbsp;" just because your <strong>n</strong>on-<strong>b</strong>reakable <strong>sp</strong>ace hit the end of the line.</p>
| 3,711 |
<p>I'm a 2-week newbie at 3D printing, working on a new Qidi Xpro machine (that is solid and one that I like). So, I do not want to believe that this issue is caused by my printer itself. I'm hoping that my settings have something to do with it.</p>
<p>The problem is all the filament lines (travel lines, I think) that... | <p>You can Z-hop what you like, but if it is oozing it is oozing, you will always see the effects of that as it just drops down.</p>
<p>Basically you have <strong>multiple issues</strong>, <strong>first the oozing</strong>, <strong>second the line markings on the top</strong>.</p>
<h1><strong>First</strong></h1>
<p>Ooz... | <p>Having run into this type of problem at the library makerspace, under a different slicer, I had a good idea where to start the search. It is, in your case, "z-hop cura slicer" and the best return came from <a href="https://polar3d.freshdesk.com/support/discussions/topics/9000021981" rel="nofollow noreferrer">Polar3D... | 1,047 |
<p>I am looking for something to integrate to my CI workflow.<br>
I've heard of <a href="http://dbdeploy.com" rel="noreferrer">dbdeploy</a> but I'm looking for something else. The reason I don't like dbdeploy is I don't want to install java on my server.</p>
<p>I would prefer of course that the solution doesn't involv... | <p><a href="http://flywaydb.org"><strong>Here</strong></a> is a <strong>feature comparison</strong> between</p>
<ul>
<li>Flyway</li>
<li>Liquibase</li>
<li>c5-db-migration</li>
<li>dbdeploy</li>
<li>mybatis</li>
<li>MIGRATEdb</li>
<li>migrate4j</li>
<li>dbmaintain</li>
<li>AutoPatch</li>
</ul>
| <p>Visual Studio Team system (database edition) does some refactoring.</p>
<p>I read the Refactoring databases book. I think it's helpful.</p>
<p>But in software dev, you build tests so that you are safe refactoring. They don't touch on tests in the Refactoring Databases book, which was my big disappointment with i... | 4,730 |
<p>All of a sudden I seem to be having a lot of issues with under extruding on my Ender 3. The bottom layer (of height 0.1 mm) prints perfectly fine. This is done at 15 mm/s speed. However, The moment the print moves to layer 2 and above (at the default speed of 60 mm/s), I start hearing a lot of clickin... | <p>Not allowed to comment, so have to answer:</p>
<ol>
<li><p>The temperature sensor is a thermally sensitive resistor. Unfortunately, the temperature is near the high limit of that sensor, and the manufacturing tolerances are very significant. That is why a temperature tower is important for each printer, as well as ... | <p>A temperature of 200 °C is fine. You probably have heat creep from a Bowden style extruder. The filament starts getting softer due to heat creeping up from the hot nozzle. Filament expands and clogs the tube causing gear clicking. Usually there is a heat sink at the the Bowden tube connection. You need to ... | 1,580 |
<p>So, to simplify my life I want to be able to append from 1 to 7 additional characters on the end of some jpg images my program is processing*. These are dummy padding (fillers, etc - probably all 0x00) just to make the file size a multiple of 8 bytes for block encryption.</p>
<p>Having tried this out with a few pr... | <p>No, you can add bits to the end of a jpg file, without making it unusable. The heading of the jpg file tells how to read it, so the program reading it will stop at the end of the jpg data.</p>
<p>In fact, people have hidden zip files inside jpg files by appending the zip data to the end of the jpg data. Because o... | <p>As others have stated, you have no control how programs process image files and therefore some programs may find the images valid others may not.</p>
<p>However, there is a bigger issue here. Judging by your question, I'm deducing you're practicing "security through obscurity." It's widely considered a very bad p... | 7,377 |
<p>I'm printing with opaque grey PETG on glass. The intention is to produce a house number plate, so a shiny, production quality finish on the bottom. For this reason, extruding at 245 °C with a bed at 95 °C, to give a perfect glass finish with no filament lines showing. Smaller test versions have been very p... | <p>Are you using Z-hop? Is there any play in the Z-axis direction? It appears that parts of the first layer are printed much thinner than other parts.</p>
<p>What can happen if there is a little play in the Z-axis direction that the nozzle doesn't return to the same level after a Z-hop movement (e.g. backlash in the l... | <p>PETG becomes transparent when the layers completely fuse. Translucency is from incomplete adhesion or voids left. Try small increases to flow or print width to get slightly better fill - or slow the speed (but speed might not affect how much material is output).</p>
<p>Also, I see the top surface has a pattern on i... | 1,581 |
<p>This is driving me crazy.</p>
<p>I have this one php file on a test server at work which does not work.. I kept deleting stuff from it till it became </p>
<pre>
<?
print 'Hello';
?>
</pre>
<p>it outputs </p>
<blockquote>
<p>Hello</p>
</blockquote>
<p>if I create a new file and copy / paste the same scri... | <p>That's the <a href="http://en.wikipedia.org/wiki/Byte_Order_Mark" rel="noreferrer">BOM (Byte Order Mark)</a> you are seeing.</p>
<p>In your editor, there should be a way to force saving without BOM which will remove the problem.</p>
| <p>Found it, file -> encoding -> UTF8 with BOM , changed to to UTF :-)</p>
<p>I should ahve asked before wasing time trying to figure it out :-)</p>
| 3,384 |
<p>I'd like to find an opensource software that communicates directly with the RAMPS board (or any other 3D printer driver) without using the arduino...</p>
<p>It doesn't matter if it runs on Windows or linux as long as it's opensource. Also, I'm not worried about how this communication is done (USB, serial port, para... | <p>No, there exists no software like that. You can't communicate with a RAMPs board because a RAMPs board has no logic built-in; it's just a dumb breakout board that connects the Arduino Mega to your printer's components (such as stepper drivers, MOSFETs for controlling heaters, endstops,...).</p>
<p>If you wanted to ... | <p>No, there exists no software like that. You can't communicate with a RAMPs board because a RAMPs board has no logic built-in; it's just a dumb breakout board that connects the Arduino Mega to your printer's components (such as stepper drivers, MOSFETs for controlling heaters, endstops,...).</p>
<p>If you wanted to ... | 267 |
<p>Does anyone know of a good (preferably open source) library for dealing with the Modbus protocol? I have seen a few libraries, but I am looking for some people's personal experiences, not just the top ten Google hits. I figure there has to be at least one other person who deals with PLCs and automation hardware like... | <p>I have done a lot of communication with devices for the past few years, since I work for a home automation company, but we don't use Modbus. We do communication in a standard and open way using Web Services for Devices(WSD) which is also know as <a href="http://en.wikipedia.org/wiki/Devices_Profile_for_Web_Services... | <p>Have a look at the offering from Colway Solutions <a href="http://www.colwaysolutions.com" rel="nofollow">http://www.colwaysolutions.com</a>. They have a unique licensing scheme where you pay for each Modbus function code that you desire to use. Its not free but the pricing seems to be low. I also saw a few ports of... | 7,847 |
<p>I just get the beach ball all day long (it's been doing nothing for hours). It's not taking CPU, not reading from disk, not using the network.</p>
<p>I'm using <strong>Java 1.6</strong> on <strong>Mac OS X 10.5.4</strong>. It worked once, now even restarts of the computer won't help. Activity Monitor says it's "(No... | <p>I get the same problem after there's been an active connection sitting idle for a while. I solve it by restarting sql developer every once in a while.</p>
<p>I also have Toad for Oracle running on a vmware XP session, and it works great. If you don't mind the money, try that.</p>
| <p>The latest version of SQL Developer is very good and I have experienced no problems with it on my Mac Pro. DB Solo 3 is also quite good.</p>
| 3,395 |
<p>We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents.</p>
<p>My question is, is th... | <p>Office 2007 allows for this. I have found <a href="http://sourceforge.net/projects/pdfcreator/" rel="nofollow noreferrer">PDFCreator</a> to be good, the VBA is included in sample files, and have heard that <a href="http://www.cutepdf.com/" rel="nofollow noreferrer">CutePDF</a> is also good. PDFCreator and CutePDF ar... | <p>You can also use a component like activePDF's <a href="http://www.activepdf.com/products/serverproducts/docconverter2009/" rel="nofollow noreferrer">DocConverter</a> to convert a <strong>lot</strong> formats to PDF. </p>
| 6,005 |
<p>What would be the best way to have a list of items with a checkbox each in Java Swing?</p>
<p>I.e. a JList with items that have some text and a checkbox each?</p>
| <p>Create a custom <code>ListCellRenderer</code> and asign it to the <code>JList</code>.</p>
<p>This custom <code>ListCellRenderer</code> must return a <code>JCheckbox</code> in the implementantion of <code>getListCellRendererComponent(...)</code> method.</p>
<p>But this <code>JCheckbox</code> will not be editable, i... | <p>Here is just a little addition to the JCheckBoxList by Rawa. This will add the ability to select using space bar. If multiple items are selected, all will be set to inverted value of the first item.</p>
<pre><code> addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e)... | 4,014 |
<p>When I pluck the belts of my CoreXY printer, I feel significantly different tension between the two idlers on the back and the tension on the sides, between the gear on the stepper shaft and the idler on the back.</p>
<p>Is this normal? If not, what could be the cause?</p>
<p>For reference, I'm using this support fo... | <p>If you are referring to the tension in a single belt, but ar different positions, the tension is everywhere the same. It is one belt, the force/tension is the same in the belt. If the length of the belt is shorter because of a carriage to idler, the plucked sound may differ but the tension is the same.</p>
<p>If you... | <p>The belts of a CoreXY should be identical in length and tensioned simultaneously to ensure proper operation. Any slack or springiness difference will result in prints that are askew. In that case, where the tension or springiness cannot be removed, the Marlin firmware allows for compensations for skewing as M-Code 8... | 2,034 |
<p>Getting slanted or leaning prints when printing multiple parts.
I checked the eccentric nuts and belts aren't rubbing anything. All works well when printing a single part. But multiple parts:</p>
<p><a href="https://i.stack.imgur.com/d4BUR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d4BUR.jpg... | <p><em>If you want a more detailed answer, you need to give more details, e.g.; "What filament are you using?" "How old is the printer?" "What mods have you made to it?"</em></p>
<hr>
<p>I can tell you two possibilities. Either your x or y axis is slipping which could be because of worn out belts, belts that need to ... | <p>It could also be backlash in the system. Your belts aren't tight enough. Apparently the Y belt is not tight enough. That's a pretty awesome effect though. </p>
| 1,365 |
<p>What are the best practices for checking in BIN directories in a collaborative development environment using SVN? Should project level references be excluded from checkin? Is it easier to just add all bin directories?</p>
<p>I develop a lot of DotNetNuke sites and it seems that in a multi-developer environment, i... | <p>Any assemblies that are expected to be in the GAC should stay in the GAC. This includes System.web.dll or any other 3rd party dll that you'll deploy to the GAC in production. This means a new developer would have to install these assemblies.</p>
<p>All other 3rd party assemblies should be references through a relat... | <p>We follow the practice of using a vendor directory which contains all vendor specific headers and binaries. The goal is that anybody should be able to build the product just by checking it out and running some top level build script. </p>
| 2,278 |
<p>Are there any browser extensions or printers with OctoPrint built in that would allow me to print straight from the browser?</p>
<p>Thinking of a workflow like this:</p>
<ol>
<li>Make something with Tinkercad (or other online service)</li>
<li>download stl or obj</li>
<li>select print from bookmark or dropdown menu<... | <p>There was the <a href="https://plugins.octoprint.org/plugins/curalegacy/" rel="nofollow noreferrer">CuraEngine</a> plugin, but it's not really maintained anymore. It should still work though</p>
| <p>This works for OctoPI (OctoPrint on a Raspberry Pi).</p>
<ol>
<li>Add the Samba package to your OctoPrint machine.</li>
<li>open an SMB connection to that machine from your browser machine</li>
<li>Save your STL to <code>/home/pi/.octoprint/uploads</code> on the Raspberry Pi.</li>
</ol>
<p>You can save directly from... | 1,475 |
<p>What is the difference, if any, between these methods of indexing into a PHP array:</p>
<pre><code>$array[$index]
$array["$index"]
$array["{$index}"]
</code></pre>
<p>I'm interested in both the performance and functional differences.</p>
<h3>Update:</h3>
<p>(In response to @Jeremy) I'm not sure t... | <p>see @svec and @jeremy above. All array indices are of type 'int' first, then type 'string', and will be cast to that as PHP sees fit.</p>
<p>Performance wise, $index should be faster than "$index" and "{$index}" (which are the same). </p>
<p>Once you start a double-quote string, PHP will go into interpolation mo... | <p>I believe from a performance perspective that $array["$index"] is faster than $array[$index] See <a href="http://www.chazzuka.com/blog/?p=163" rel="nofollow noreferrer">Best practices to optimize PHP code performance</a></p>
<p>Another variation that I use sometimes when I have an array inside a string is:</p>
<pr... | 2,835 |
<p>Is there a way to auto discover a specific WCF service in the network? I don't want to config my client with the address if this is possible.</p>
| <p>What you want to look at is the WS-Discovery protocol. I found a sample on <a href="http://wcf.netfx3.com/files/folders/protocol_channels/entry7909.aspx" rel="nofollow noreferrer">netfx3's</a> website of using the <a href="http://en.wikipedia.org/wiki/WS-Discovery" rel="nofollow noreferrer">specification</a>. I wo... | <p>What you want to look at is the WS-Discovery protocol. I found a sample on <a href="http://wcf.netfx3.com/files/folders/protocol_channels/entry7909.aspx" rel="nofollow noreferrer">netfx3's</a> website of using the <a href="http://en.wikipedia.org/wiki/WS-Discovery" rel="nofollow noreferrer">specification</a>. I wo... | 8,949 |
<p>From what I've read, <a href="http://blogs.msdn.com/astebner/archive/2008/08/11/8849574.aspx" rel="nofollow noreferrer">VS 2008 SP1 and Team Foundation Server SP1 packages are traditional service packs that require you to first install the original versions before you will be able to install the SP</a>.</p>
<p>Is t... | <p>Here's an <a href="https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3337363&SiteID=1" rel="nofollow noreferrer">MSDN forum post</a> in which an MSFTie indicates it will be possible and that details are forthcoming. Another poster is relaying results of her almost-successful attempt. Looks like this will ... | <p>::Copy some file to make slipstream integration successful. copy "VS2k8WithSP1\Program Files\Microsoft Visual Studio 9.0\Common7\1033*.chm" "VS2k8WithSP1\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\"</p>
<p>there is a error here, should be:</p>
<p>::Copy some file to make slipstream integration successfu... | 3,346 |
<p>I'm trying to be better about unit testing my code, but right now I'm writing a lot of code that deals with remote systems. SNMP, WMI, that sort of thing. With most classes I can mock up objects to test them, but how do you deal with unit testing a real system? For example, if my class goes out and gets the Win32... | <p>Assuming you meant "How do I test against things that are hard/impossible to mock":</p>
<p>If you have a class that "goes out and gets the Win32_LogicalDisk object for a server" AND does something else (consumes the 'Win32_LogicalDisk' object in some way), assuming you want to test the pieces of the class that cons... | <p>You might create a set of "test stubs" that replace the core library routines and return known values, perhaps after suitable delays.</p>
<p>As an example, I recently needed to develop code to run inside a 3rd-party product. The challenge was that our "partner" would be doing the compiling and integration with the... | 6,607 |
<p>It wasn't that long ago that I was a beginning coder, trying to find good books/tutorials on languages I wanted to learn. Even still, there are times I need to pick up a language relatively quickly for a new project I am working on. The point of this post is to document some of the best tutorials and books for the... | <p>I know this is going to seem old-fashioned, but I don't think much of using online tutorials to learn programming languages or platforms. These generally give you no more than a little taste of the language. To really learn a language, you need the equivalent of a "book", and in many cases, this means a real dead-... | <p>MSDN<br>
<a href="http://msdn.microsoft.com/en-us/library/ms229335.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms229335.aspx</a></p>
| 4,288 |
<p>We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio, .NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN.... | <blockquote>
<p>I heard about VisualSVN and
integration with visual studio</p>
</blockquote>
<p>Point to note, VisualSVN (the one that integrates with VStudio) is <em>not</em> a server technology at all, it is simply a integrated GUI front end to SVN, and in fact works <em>through</em> TortoiseSVN (which is <stron... | <p>You can get hosting of secure svn repositories from a variety of sources: <a href="http://beanstalkapp.com/" rel="nofollow noreferrer">http://beanstalkapp.com/</a> and many others. Often free if the usage (users, data, etc.) is limited.</p>
<p>VisualSVN does integrate with Visual Studio but not like SourceSafe does... | 3,599 |
<p>Is it any compilator option of flag?</p>
| <p>You can if you setup an external tool pointing to MsBuild to build the solution with the multiple process flag /m.</p>
<p>Scott Hanselman wrote a <a href="http://www.hanselman.com/blog/FasterBuildsWithMSBuildUsingParallelBuildsAndMulticoreCPUs.aspx" rel="noreferrer">nice post</a> on how to accomplish this, so I won... | <p>MSDN answers your question:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb383805.aspx" rel="nofollow noreferrer">Using Multiple Processors to Build Projects</a></p>
| 7,505 |
<p>This is a continuation of <a href="https://3dprinting.stackexchange.com/questions/19523/filament-not-being-extruded">this question</a> where comments and answers were extremely helpful in diagnosing the issue, which I am still unable to solve.</p>
<p>I determined I have the problem shown in figure 3 on <a href="http... | <p>Yes.</p>
<p>The issue is, that there are small gaps between the layers. But you can coat the print in an airtight material. While epoxy and similar materials work very well, they are somewhat too viscous and take a long time to cure.</p>
<p>My special recipe for coating PLA prints with a fast-curing airtight thin la... | <p>Yes.</p>
<p>The issue is, that there are small gaps between the layers. But you can coat the print in an airtight material. While epoxy and similar materials work very well, they are somewhat too viscous and take a long time to cure.</p>
<p>My special recipe for coating PLA prints with a fast-curing airtight thin la... | 2,166 |
<p>I've been playing with RSS feeds this week, and for my next trick I want to build one for our internal application log. We have a centralized database table that our myriad batch and intranet apps use for posting log messages. I want to create an RSS feed off of this table, but I'm not sure how to handle the volum... | <p>If you are building a system with notifications that must not be missed, then a pub-sub mechanism (using XMPP, one of the other protocols supported by ApacheMQ, or something similar) will be more suitable that a syndication mechanism. You need some measure of coupling between the system that is generating the notifi... | <p>Without knowing your application, I can't offer specific advice. </p>
<p>That said, it's common in these sorts of systems to have a level of severity. You could have a query string parameter that you tack on to the end of the URL that specifies the severity. If set to "DEBUG" you would see every event, no matter ho... | 8,478 |
<p>Trying to make a MySQL-based application support MS SQL, I ran into the following issue:</p>
<p>I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative values. MS SQL does not support the unsigned attribute on all int... | <p>When is the problem likely to become a real issue?</p>
<p>Given current growth rates, how soon do you expect signed integer overflow to happen in the MS SQL version?</p>
<p>Be pessimistic.</p>
<p>How long do you expect the application to live?</p>
<p>Do you still think the factor of 2 difference is something you... | <p>I would say this.. "How do we normally deal with differences between components?"</p>
<p><strong>Encapsulate what varies</strong>..</p>
<p>You need to create an abstraction layer within you data access layer to get it to the point where it <em>doesn't care</em> whether or not the database is MySQL or MS SQL..</p>
| 4,942 |
<p>I have the task of developing an online examination software for a small university, I need to implement measures to prevent cheating...</p>
<p>What are your ideas on how to do this? </p>
<p>I would like to possibly disable all IE / firefox tabs, or some how log internet activity so I know if they are googling anw... | <p>Simply put, <strong>no</strong> there is no realistic way to accomplish this if it is an online exam (assuming they are using their own computers to take the exam).</p>
| <p>Randomize questions, ask a random set of questions from a large bank... time the answers...</p>
<p>Unless you mean hacking your site, which is a different question.</p>
| 6,905 |
<p>I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the <a href="http://wrapper.tanukisoftware.org/" rel="noreferrer">Java Service Wrapper</a>, the <a href="http://commons.apache.org/daemon/jsvc.html" rel="noreferrer">Apache Commons project 'jsvc'</a>,... | <p>I've had great success with Java Service Wrapper myself. I haven't looked at the others, but the major strengths of ServiceWrapper are:</p>
<ul>
<li>Great x-platform support - I've used it on Windows and Linux, and found it easy on both</li>
<li>Solid Documentation - The docs are clear and to the point, with great... | <p>Are there any special attributes that you need to apply (like OS guided resource management) that you need to support? Otherwise, for Unix you should be able to daemonize your application by writing an appropriate init.d script and setting your app to start automatically.</p>
| 4,514 |
<p>Is it possible with the accuracy of current 3D printers to print a sound trace? </p>
<p>On a vinyl record the grooves in the record are an encoded sound. Is something like this doable with 3D printers? </p>
<p>If Vinyl-like isn't possible, could a sound be printed at desktop scale? I mean printing the waves out th... | <h2>Sound Encoding basics</h2>
<p>Sound is a compression wave, and any depiction of it has to be an encoding of it. You can encode it so you can recreate the sound using a contraption that oscillates in the right way to compress air again in the right pattern, but you can't just "print it out" like you can sc... | <p>I think this is just about doable. In this answer, I will assume you want to produce a "rumble strip" style of object that will reproduce a recording of human speech. I'll assume you don't care about sound quality, you just want the words to be intelligible.</p>
<p>The main things to consider are the printer's reso... | 1,484 |
<p>I'm looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them?</p>
| <p>The filesystem backend is only worth looking at if you're not going to use a database for any other part of your system. If you are using a database then the filesystem backend has nothing to recommend it.</p>
<p>The memcache backend is much quicker than the database backend, but you run the risk of a session being... | <p>If the database have a DBA that isn't you, you may not be allowed to use a database-backed session (it being a front-end matter only). Until django supports easily merging data from several databases, so that you can have frontend-specific stuff like sessions and user-messages (the messages in django.contrib.auth ar... | 7,337 |
<p><strong>TL;DR:</strong> I'm looking to change the steps per mm but I'm not sure what to set it to. Do I decide on a temperature and change the rate based on the percentage for that temp? Or is there a more general setting I can put it to? Or is there a different underlying problem here?</p>
<p>I'm running into an i... | <p>Obviously, your extrusion process is troubled by a lot of pressure. This can be seen from the extensive experiment you conducted with PLA extrusion at different temperatures. Please do note that 230 °C is considered pretty high for PLA! Usually it should be in the range of <a href="https://rigid.ink/blogs/news/3... | <p>So I feel that I solved the problem thanks to a few sources. Thanks to 0scar for his quick response and help.</p>
<p>The problem was two fold. Mechanical problem causing blockage and slicer setting causing ripple.</p>
<ol>
<li>The PTFE tube wasn't pushed all the way in as far as it could go causing too much pressu... | 1,109 |
<p>I have Windows File sharing enabled on an OS X 10.4 computer. It's accessible via \rudy\myshare for all the Windows users on the network, except for one guy running Vista Ultimate 64-bit edition. </p>
<p>All the other users are running Vista or XP, all 32-bit. All the workgroup information is the same, all login wi... | <p>Try changing the local security policy on that Vista box for "Local Policies\Security Options\Network Security: LAN manager authentication level" from “Send NTLMv2 response only” to “Send LM & NTLM - use NTLMv2 session security if negotiated”.</p>
| <p>No I have successfully done this with my Vista 64-bit machine. You may want to try using the IP Address of the machine and try connecting that way. Or maybe check out the log files on the Mac to see what the rejection error was.</p>
| 2,602 |
<p>I'm working on a project which uses .NET Remoting for communication between the client application and an object server. For development, the client, server, and MSSQL database are all running on my local development machine. </p>
<p>When I'm working at the office, the responsiveness is just fine. </p>
<p>However,... | <p>Perhaps during development you could use an IPC remoting channel which uses named pipes instead of TCP. If your remoting channels are set up via a config file then you won't even have to recompile.</p>
<p>I found the link below was useful when setting up an IPC channel.</p>
<p><a href="http://www.danielmoth.com/Bl... | <p>I worked on a project last summer that required some pretty heavy modifications to .NET Remoting. I don't remember all the specifics, but if we had more than one network interface, we couldn't get the out-of-the-box Remoting implementation to reliably detect which one the Remoting traffic came from, which did horrib... | 2,698 |
<p>I'm looking to buy my first 3D Printer, on a tight budget of $250. Unfortunately, this printer that I found on Amazon comes with all the bells and whistles, <em>except</em> for a heated bed. </p>
<p>I want to know if this would affect printing severely, as I have read that the plastic/ filament cools down rather qu... | <p>I've tried to reduce the "Extrusion multiplier" from 1 to 0.95, but that caused gaps. Now I've minimized the clicking by setting the Slic3r option "Infill before perimeters" on the "Print Settings > Infill" page.</p>
| <p>I had this issue and it turned out to be the extruder cog rubbing on the inside of the hole in the heatsink, causing the stepper to slip. </p>
| 453 |
<p>I have a complete XML document in a string and would like a <code>Document</code> object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5)</p>
<p><strong>Solution</strong> Thanks to <a href="https://stackoverflow.com/users/1322/matt-mcminn">Matt McMinn</a>, I have settled on this i... | <p>This works for me in Java 1.5 - I stripped out specific exceptions for readability.</p>
<pre><code>import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import java.io.ByteArrayInputStream;
public Document loadXMLFromString(String xml) throws Except... | <p>To manipulate XML in Java, I always tend to use the Transformer API:</p>
<pre><code>import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamSource;
public sta... | 5,329 |
<p>I'm designing a few mechanisms with OpenSCAD, and one of the parameters that need adjustment between printers/filaments is allowances between pieces that need to be assembled together (for example, if I want a "5 mm diameter pin" to fasten two pieces together, how much larger than 5 mm will the holes / how... | <p>It helps to understand the different aspects of dimensions, so you can use the terminology correctly. This will help you define your variables in OpenSCAD with correct names. (Tolerance is the wrong term to use.) And once you have correct names, you'll understand how to specify the dimensions in OpenSCAD.</p>
<u... | <p>Well, the tolerances will depend on material to be used for fabrication of the required part and also where the part will go and fit. Remember the all parts need some clearance to fit properly.</p>
<p>Few years ago (10 years) I was working as Quality Engineer and some Design Engineers were complaining about a Dupon... | 769 |
<p>I got a life size model of a signaling post (trains) where I scale it down to 1/87 model (in SketchUp). When I send the model to my 3D printer (with Cura 2.4) some parts of the model are lost in translation even when their dimensions exceed the printer minimal dimension of 0.7 mm. </p>
<p>Is this a known probl... | <p>Yes, with the proper equipment.</p>
<p>Printing wax filament (at 51 seconds): <a href="https://youtu.be/tibkVZB_n9c?t=51s" rel="noreferrer">https://youtu.be/tibkVZB_n9c?t=51s</a></p>
<p>There are also options for melting wax, filling a heated reservoir head, and printing with that. I recommend doing this with a co... | <p>Just make a silicone mold of any of your prints and pour you wax in the silicone,you silicone putty is pretty cheap so is wax ,no need to break the bank as printers have become less expensive and can do a pretty good job </p>
| 632 |
<p>I'm building an HTML UI with some text elements, such as tab names, which look bad when selected. Unfortunately, it's very easy for a user to double-click a tab name, which selects it by default in many browsers.</p>
<p>I might be able to solve this with a JavaScript trick (I'd like to see those answers, too) -- bu... | <p>In most browsers, this can be achieved using CSS:</p>
<pre class="lang-css prettyprint-override"><code>*.unselectable {
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
/*
Introduced in IE 10.
See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
*/
... | <p>The following works in Firefox interestingly enough if I remove the write line it doesn't work.
Anyone have any insight why the write line is needed.</p>
<pre><code><script type="text/javascript">
document.write(".");
document.body.style.MozUserSelect='none';
</script>
</code></pre>
| 9,480 |
<p>I use Firebug and the Mozilla JS console heavily, but every now and then I run into an IE-only JavaScript bug, which is really hard to locate (ex: <em>error on line 724</em>, when the source HTML only has 200 lines).</p>
<p>I would love to have a lightweight JS tool (<em>a la</em> firebug) for Internet Explorer, so... | <p>You might find <a href="http://getfirebug.com/lite.html" rel="noreferrer">Firebug Lite</a> useful for that. </p>
<p>Its bookmarklet should be especially useful when debugging on a user's machine.</p>
| <ol>
<li>Go to Tools->Internet Options…->Advanced->Enable Script Debugging (Internet Explorer)</li>
</ol>
<p>then attach Visual Studio Debugger when an error occurs.</p>
<p>If you're using IE 8, install the developer toolbar because it has a built in debugger.</p>
| 2,553 |
<p>I've made a 9H-printing model tonight, and only a little part of it failed (because a support dropped off). I want to reprint only that little part.</p>
<p>How can I do that in Cura? <strong>How can I tell Cura to generate a gcode file so only that little part (inside the transparent cube below) will be printed?</s... | <p>The latest version of Ultimaker Cura can do that (version 3.6).</p>
<p>I have built models made of different material in the same model.</p>
<p>How to do this is:</p>
<ol>
<li>Select your CUBE and select the icon "Per Model Setting" in left side menu.</li>
<li>choice "Normal model", select the following settings:... | <p>What you can also try is to separate the part from the rest of the model within your CAD software. In FreeCAD for example, you can use the mesh design workbench to cut the small part away from the rest, then you slice this small piece and print it.</p>
| 905 |
<p>How do I generate an ETag HTTP header for a resource file?</p>
| <p>An etag is an arbitrary string that the server sends to the client that the client will send back to the server the next time the file is requested.</p>
<p>The etag should be computable on the server based on the file. Sort of like a checksum, but you might not want to checksum every file sending it out.</p>
<pre><... | <p>I would recommend not using them and going for last-modified headers instead.</p>
<p>Askapache has a useful article on this. (as they do pretty much everything it seems!)</p>
<p><a href="http://www.askapache.com/htaccess/apache-speed-etags.html" rel="nofollow noreferrer">http://www.askapache.com/htaccess/apache-sp... | 2,652 |
<p>I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent project's package goal, the console shows a successful build and all of the files are created. However the AAR file generated by AAR project is not included in the... | <p>I was able to get my maven build working correctly by adding the following plugin to the ws-war pom file:</p>
<pre><code> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
... | <p>Have you tried using the "type" element in your dependencies? For example:</p>
<pre><code><dependency>
<groupId>group-a</groupId>
<artifactId>artifact-b</artifactId>
<version>1.0</version>
<type>aar</type>
</dependency>
</code></pre>
<p>Its hard ... | 9,918 |
<p>Testing my new Wanhao i3+. PLA plastic(Wanhao), basic normal quality settings in Cura (I guess 0.1 mm layer, 40 mm/s speed, 60c bed temp, 200c extruder temp). After 1.5 hours of printing quality degraded, it makes some loose structure. </p>
<p>Edit:
After finish I noticed that problem exists only in layers where it... | <p><strong>It definitely looks like under extrusion.</strong> </p>
<ol>
<li>First thing I would check is the filament feeder to make sure it has
a good grip in the filament.</li>
<li>After that I would do another print to see if the problem is repeatable.</li>
</ol>
<p>If it doesn't repeat, it may have been </p>
<u... | <p><strong>It definitely looks like under extrusion.</strong> </p>
<ol>
<li>First thing I would check is the filament feeder to make sure it has
a good grip in the filament.</li>
<li>After that I would do another print to see if the problem is repeatable.</li>
</ol>
<p>If it doesn't repeat, it may have been </p>
<u... | 649 |
<p>I've had a lot of good experiences learning about web development on <a href="http://www.w3schools.com/" rel="nofollow noreferrer">w3schools.com</a>. It's hit or miss, I know, but the PHP and CSS sections specifically have proven very useful for reference.</p>
<p>Anyway, I was wondering if there was a similar site ... | <p>Rick Strahl and Matt Berseth's blogs both tipped me into jQuery and man am I glad they did. jQuery completely changes a) your client programming perspective, b) the grief it causes it you, and c) how much fun it can be! </p>
<p><a href="http://www.west-wind.com/weblog/" rel="noreferrer">http://www.west-wind.com/web... | <p>I use <a href="http://prototypejs.org/" rel="nofollow noreferrer">Prototype</a>, which I like. I'm afraid I don't know jQuery, so I can't compare them, but I think Prototype is worth checking out. Their API docs are generally pretty good, in my experience (which certainly helps with learnability).</p>
| 4,687 |
<p>What is the best way to multi-thread in the C language? I want something that is very efficient and not a CPU hog. Thanks.</p>
| <p>The correct (standard) way to do this on C and Windows is with <a href="http://msdn.microsoft.com/en-us/library/kdzttdcb.aspx" rel="nofollow noreferrer">__beginthreadex</a>.</p>
<p>This is usually preferred to calling <a href="http://msdn.microsoft.com/en-us/library/kdzttdcb.aspx" rel="nofollow noreferrer">CreateTh... | <p>Your question is a bit general to answer effectively. You might look into such things as:</p>
<p>CreateThread in the windows SDK</p>
<p>boost::thread</p>
| 6,469 |
<p>There is a 3D desktop printer <a href="https://en.wikipedia.org/wiki/RepRap_project">RepRap</a> which can print most of its own components.</p>
<p>Assuming each printed printer will print the next one and so on. Are there any limitation how many times this can be achieved?</p>
<p>For example somebody printed for m... | <p>The files used to print these objects are digital, and do not degrade in any way after each printing. There are no side effects or degradation that occurs over time due simply to printing them multiple times.</p>
<p>This is the RepRap philosophy, and the machines are actually designed with enough tolerance for prin... | <p>As long as you maintain each printer and keep a proper calibration, go for it, this is what they were designed to do, I've even made replacement parts for myself.</p>
<p>Unfortunately the <a href="https://en.wikipedia.org/wiki/RepRap_project#History" rel="nofollow">RepRap project just shut down on 1/15/16</a> due t... | 96 |
<p>I'm using the VBO extension for storing Vertex, normal and color buffers (glBindBufferARB)
For some reason when changing buffers or doing some operation the application crashes with an access violation. When attaching The debugger I see that the crash is in some thread that is not my main thread which performs the o... | <p>Assuming this is about Windows, NVIDIA has a <a href="http://developer.nvidia.com/object/glexpert_home.html" rel="nofollow noreferrer">GLExpert</a> tool. It can print various OpenGL warnings/errors.</p>
<p>In some other cases, using <a href="http://glintercept.nutty.org/" rel="nofollow noreferrer">GLIntercept</a> O... | <p>One of the best OpenGl/D3D debugging tools is nVidia's NvPerfHUD. It won't help you find your exact problem, but it does provide another view of what you are sending into the rendering pipeline.</p>
<p>However, I will say that I've only used it with D3D applications so I don't know if it helps as much with OpenGL ... | 9,154 |
<p>We're using Mercurial where I work and I want to have a setup similar to how I used SVN:</p>
<ul>
<li>Trunk</li>
<li>Tags
<ul>
<li>Production</li>
</ul></li>
<li>Branches</li>
</ul>
<p>Since Mercurial supports branches natively, I know how to create a named branch, but I can't find any documentation on how to rep... | <p>As the previous poster mentioned, the transplant extension can be used for cherry-picking individual changes from one branch to another. If, however, you always want to pull <em>all</em> the latest changes, the <code>hg merge</code> command will get you there.</p>
<p>The simplest case is when you're using clones t... | <p>Something like <a href="http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension" rel="nofollow noreferrer"><code>hg transplant</code></a>? That's what we use on our dev and prod branches.</p>
| 7,294 |
<p>It seems obvious that some people have been able to figure out how to access the iPhone camera through the SDK (Spore Origins, for example). How can this be done?</p>
| <p>You need to use the <code>UIImagePickerController</code> class, basically:</p>
<pre><code>UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = pickerDelegate
picker.sourceType = UIImagePickerControllerSourceTypeCamera
</code></pre>
<p>The <code>pickerDelegate</code> object ab... | <p>Hmmmm.....Ever tried using an OverlayView? With this the camera might look customized but in actuality its just a view above it.</p>
<p>If the private API's are directly accessed it might result in the app being rejected by Apple.
See if the below link helps.</p>
<p><a href="http://www.articlesbase.com/programming... | 9,981 |
<p>I have been searching everywhere for the following functionality in Lisp, and have gotten nowhere:</p>
<ol>
<li><p>find the index of something in a list. example:</p>
<pre><code>(index-of item InThisList)
</code></pre></li>
<li><p>replace something at a specific spot in a list. example:</p>
<pre><code>(replace it... | <p>You can use <code>setf</code> and <code>nth</code> to replace and retrieve values by index.</p>
<pre><code>(let ((myList '(1 2 3 4 5 6)))
(setf (nth 4 myList) 101); <----
myList)
(1 2 3 4 101 6)
</code></pre>
<p>To find by index you can use <a href="http://www.cs.cmu.edu/afs/cs/project/ai-repository/... | <p>I have to agree with Thomas. If you use lists like arrays then that's just going to be slow (and possibly awkward). So you should either use arrays or stick with the functions you've written but move them "up" in a way so that you can easily replace the slow lists with arrays later.</p>
| 6,703 |
<p>Imagine I have String in C#: "I Don’t see ya.."</p>
<p>I want to remove (replace to nothing or etc.) these "’" symbols. </p>
<p>How do I do this?</p>
| <p>That 'junk' looks a lot like someone interpreted UTF-8 data as ISO 8859-1 or Windows-1252, probably repeatedly.</p>
<p>’ is the sequence C3 A2, E2 82 AC, E2 84 A2.</p>
<ul>
<li>UTF-8 C3 A2 = U+00E2 = â</li>
<li>UTF-8 E2 82 AC = U+20AC = €</li>
<li>UTF-8 E2 84 A2 = U+2122 = ™</li>
</ul>
<p>We then do it aga... | <p>The ASCII / Integer code for these characters would be out of the normal alphabetic Ranges. Seek and replace with empty characters. String has a Replace method I believe.</p>
| 9,830 |
<p>I'm trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this?</p>
<p>EDIT: There are 53 columns in this table (NOT MY DESIGN)</p>
| <p>Actually there is a way, you need to have permissions of course for doing this ...</p>
<pre><code>SET @sql = CONCAT('SELECT ', (SELECT REPLACE(GROUP_CONCAT(COLUMN_NAME), '<columns_to_omit>,', '') FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<table>' AND TABLE_SCHEMA = '<database>'), ' FROM ... | <p>Im pretty late at throing out an answer for this, put this is the way i have always done it and frankly, its 100 times better and neater than the best answer, i only hope someone will see it. And find it useful</p>
<pre><code> //create an array, we will call it here.
$here = array();
//create an SQL que... | 3,058 |
<p>What steps I need to perform in order to convert asp.net 2 application from IIS7 classic to integrated mode?</p>
| <p>Here is a process:
<a href="http://www.west-wind.com/WebLog/posts/6075.aspx" rel="noreferrer">Rick Strahl's blog</a></p>
| <p>Nothing really. ASP.NET 2.0 applications will run just as they have in IIS 6.0. If you want to take advantage of any of the new features then you just need to update your code. But unless you are changing the structure of the header of the response or intercepting requests for other applications you probably will... | 3,193 |
<p>Comparing string in C# is pretty simple. In fact there are several ways to do it. I have listed some in the block below. What I am curious about are the differences between them and when one should be used over the others? Should one be avoided at all costs? Are there more I haven't listed? </p>
<pre><code>st... | <p>Here are the rules for how these functions work:</p>
<p><strong><code>stringValue.CompareTo(otherStringValue)</code></strong></p>
<ol>
<li><code>null</code> comes before a string</li>
<li>it uses <code>CultureInfo.CurrentCulture.CompareInfo.Compare</code>, which means it will use a culture-dependent comparison. Th... | <p>Using .Equals is also a lot easier to <em>read</em>.</p>
| 6,603 |
<p>I have a Flashforge Creator Dual.</p>
<p>One corner of my print bed is warped down. I am thinking about having a steel print bed made so it would tend to stay flat. </p>
<p>Has anyone tried this?</p>
| <p>Whether you should use steel or aluminum depends on the construction of your print bed stack. Either will work, but there are trade-offs involved.</p>
<p>Various considerations that may come into play:</p>
<ul>
<li>A flat sheet of aluminum has better <strong>stiffness/weight ratio</strong> than a flat sheet of ste... | <p>I would consider getting another aluminum build plate for the following reasons:</p>
<ul>
<li><strong>Lightweight</strong>. Aluminum is a very lightweight metal, making it suitable for most machines that have injection molded platform arms. This reduces potential sagging of the arms and overall load on the -Z- axis... | 287 |
<p>In my previous research for mods for my Ender 3v2, I came across the topic of part cooling mods. The two most common are the Petsfang and Hero Me sets.</p>
<ol>
<li><p>What are the pros and cons of third-party/DIY part cooling mods?</p>
</li>
<li><p>What benefit does having a third-party/DIY part cooling mod provide... | <p>Cooling duct design is not well understood by either the 3D printer OEMs (exceptions may apply) nor by the aftermarket cooling options or most of the homebrew designs.</p>
<p>The problem is the lack of the understanding in aerodynamic design. Note that the fans that we use to produce the cooling flows are pushing f... | <p>Part cooling is essential to print at any decent <em>vertical speed</em> (layers per second), which is critical if you do rapid prototyping of small parts or vase mode prints. This is because you can't (repeatedly) print on top of material that hasn't yet cooled enough to be rigid; if you do, after a few layers, you... | 2,132 |
<p>It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work</p>
<pre><code>/something to search for/i
</code></pre>
| <p>You can also type command <code>-I</code> while less is running. It toggles case sensitivity for searches.</p>
| <p>When using -i flag, be sure to enter the search string completely in lower case, because if any letter is upper case, then its an exact match.</p>
<p>See also: the -I (capital i) flag of less(1) to change this behavior.</p>
| 3,751 |
<p>So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths.</p>
<p>What do you do?</p>
| <p>I don't think the <a href="http://svnbook.red-bean.com/nightly/en/svn.ref.reposhooks.pre-commit.html" rel="noreferrer">pre-commit</a> hook can actually change the data that is being committed - it can disallow a commit, but I don't think it can do the conversion for you.</p>
<p>It sounds like you want the <a href="... | <p>you can use notepad++ to batch convert line endings.
Make regex search:</p>
<p><code>([^\r])\n</code></p>
<p>and replace it with</p>
<p><code>$1\r\n</code></p>
<p>you then should choose a bunch of test files like:</p>
<p><code>*.xml;*.txt;*.csv;...</code>asf.</p>
<p>this avoids that you accidently modify binar... | 3,646 |
<p>About two days ago, I started seeing that my hotend was heating up erratically. I first noticed this while printing a part in PETG and the temp jumped to 260 °C. I shut down the printer at that time and first started checking the hardware. I noticed that the E3D V6 thermistor had been tightened too much. I disa... | <p>One of the thermistor wires had come loose from the crimp ferrules. I re-crimped it and it works fine now. </p>
| <p>This can come from several sources:</p>
<h1>Hardware</h1>
<p>The thermistor or its connections might be damaged, and the fault is only observable when the hotend is hot or moved to a certain area. Start by checking the wiring! You may be able to repair a bad connection easily, but depending what was broken, you may ... | 844 |
<p>We're printing on a WASP 3MT pellet extruder with PLA. To save time, we're leaving the hotend at 160 °C between prints but realized that the print quality varies, from one print to the another, when using the same G-code file. </p>
<p>Could it be that leaving the temperature at 160 °C constantly creates m... | <p>PLA starts to change its properties at above its glass transition temperature of 60-65 °C, if stored there too long. Keeping it at 160°C, close to the melting temperature (173-178 °C) can degrade the material relatively rapidly. During an extrusion, this is usually mitigated by filling fresh material into ... | <p>I leave the extruder working at 190°C between printings up to for 20 minutes while I made the change; this only provoques that the nozzle gets empty; nothing gets burned or clogged. Once to start againg just feed a little more of filament manualy or waits to the skirt do the cleaning and refilling the nozzle. </p>
... | 1,123 |
<p>Coming from <code>J2ME</code> programming are there any similarities that would make it easy to adapt to <code>Android API</code>. Or is <code>Android API</code> completely different from the <code>J2ME</code> way of programming mobile apps. </p>
| <p>Actually the Android API is much more powerful than the J2ME.</p>
<p>It is much easier to create an application for the Android.</p>
<p>Using the J2ME you are limited to simple forms due to the absent of swing-like libraries (though now there exists a library called LWUIT, avoiding the need to recreate from scratc... | <p>Well, you may not actually need to adapt.</p>
<p>There is a good chance that a J2ME stack will become available for Android before long since Android is not supposed to become as restrictive of third-party runtimes as the iPhone.</p>
<p>I know one guy who has been working on just that:
<a href="http://justanapplic... | 9,031 |
<p>I've always found checkin (commit) mails to be very useful for keeping track of what work other people are doing in the codebase / repository. How do I set up SVN to email a distribution list on each commit?</p>
<p>I'm running clients on Windows and the Apache Subversion server on Linux. The answers below for vario... | <p>You use the <a href="http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html#svn.reposadmin.create.hooks" rel="noreferrer">post-commit hooks</a>. Here's a <a href="http://builddeploy.blogspot.com/2008/01/implementing-subversion-post-commit.html" rel="noreferrer">guide</a>.</p>
<p>Here's a sample Ruby script ... | <p>There is a (large) example written in Perl included in the Subversion source (it can be <a href="http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/commit-email.pl.in" rel="nofollow noreferrer">viewed here</a>).</p>
| 2,946 |
<p>I want to highlight C/C++/Java/C# etc source codes in my website.</p>
<p>How can I do this?</p>
<p>Is it a CPU intensive job to highlight the source code?</p>
| <p>You can either do this server-side or client-side. It's not very processor intensive, but if you do it client side (using Javascript) there will be a noticeable lag. Most client side solutions revolve around Google Code's syntax highlighting engine. This seems to be the most popular one: <a href="http://alexgorba... | <p>I use <a href="http://code.google.com/p/syntaxhighlighter/wiki/Usage" rel="nofollow noreferrer">SyntaxHighligher</a> on <a href="http://bradwilson.typepad.com" rel="nofollow noreferrer">my blog</a>.</p>
| 9,557 |
<p>Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code:</p>
<pre><code>#define PRINT(x, format, ...) \
if ( x ) { \
if ( debug_fd != NULL ) { \
fprintf(debug_fd, format, ##__VA_ARGS__); \
} \
e... | <p>You can also use the HTML tags <pre><code> in succession. I find this easier for pasting code into the window.</p>
<p><pre><code>#define PRINT(x, format, ...)
if ( x )
{
if ( debug_fd != NULL )
{
fprintf(debug_fd, format, ##VA_ARGS);
}
else
{
fprintf(stdout, f... | <pre><code>#define PRINT(x, format, ...)
if ( x )
{
if ( debug_fd != NULL )
{
fprintf(debug_fd, format, ##VA_ARGS);
}
else
{
fprintf(stdout, format, ##VA_ARGS);
}
}
</code></pre>
| 6,432 |
<p>In handling a form post I have something like</p>
<pre><code> public ActionResult Insert()
{
Order order = new Order();
BindingHelperExtensions.UpdateFrom(order, this.Request.Form);
this.orderService.Save(order);
return this.RedirectToAction("Details", new { id = order.ID })... | <p>I'm now using <a href="https://stackoverflow.com/questions/34709/how-do-you-use-the-new-modelbinder-classes-in-aspnet-mvc-preview-5#34725">ModelBinder</a> so that my action method can look (basically) like:</p>
<pre><code> public ActionResult Insert(Contact contact)
{
if (this.ViewData.ModelState.Is... | <p>Wrap it in an interface and mock it.</p>
| 4,835 |
<p>I've been reading a lot lately about the next release of Java possibly supporting <a href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29" rel="noreferrer">closures</a>. I feel like I have a pretty firm grasp on what closures are, but I can't think of a solid example of how they would make an Object-Or... | <p>As a Lisp programmer I would wish that the Java community understands the following difference: <strong>functions as objects vs. closures</strong>.</p>
<p>a) <strong>functions can be named or anonymous</strong>. But they can also be objects of themselves. This allows functions to be passed around as arguments, retu... | <p>Not only that benjismith, but I love how you can just do...</p>
<p>myArray.sort{ it.myProperty }</p>
<p>You only need the more detailed comparator you've shown when the natural language comparison of the property doesn't suit your needs.</p>
<p>I absolutely love this feature.</p>
| 7,299 |
<p>I currently use AnkhSVN to integrate subversion into Visual Studio. Is there any reason I should switch to VisualSVN?</p>
<p>AnkhSVN is free (in more than one sense of the word) while VisualSVN costs $50. So right there unless I'm missing some great feature of VisualSVN I don't see any reason to switch.</p>
| <p>I used VisualSVN until Ankh hit 2.0, and ever since, I've abandoned VisualSVN. Ankh has surpassed VisualSVN in functionality, in my mind, and all the 1.x perf and integration issues are gone.</p>
| <p>The main thing is that VisualSVN uses TortoiseSVN for nearly all of its UI. So you only really have to set up one client (preferred diff viewer, etc), and you can take advantage of things like the same "Previous messages" button on the Commit dialog, whether you're committing from Explorer or Visual Studio.</p>
| 4,383 |
<p>I wish Subversion had a better way of moving tags. The only way that I know to move a tag is to remove the file from the tag and then copy it again. Revision tree browsers don't seem to handle that very well. This also requires keeping the directory structure under the trunk and tag in sync.</p>
<p>Use case: We hav... | <p>I don't think you can ever do this with the way that subversion operates. I believe the best solution would be to look at a tool like <a href="http://git.or.cz/" rel="nofollow noreferrer">git</a> which seems like it fits into your use case. You're production system could 'pull' in the "maps" that are accepted. Wh... | <p>Why don't you make a new tag for the current production version? Remember, Subversion is not CVS. So making a copy of the complete directory tree doesn't cost you anything.</p>
| 8,797 |
<p>One of my co-workers claims that even though the execution path is cached, there is no way parameterized SQL generated from an ORM is as quick as a stored procedure. Any help with this stubborn developer?</p>
| <p>I would start by reading this article:</p>
<p><a href="http://decipherinfosys.wordpress.com/2007/03/27/using-stored-procedures-vs-dynamic-sql-generated-by-orm/" rel="nofollow noreferrer">http://decipherinfosys.wordpress.com/2007/03/27/using-stored-procedures-vs-dynamic-sql-generated-by-orm/</a></p>
<p>Here is a sp... | <p>Measure it. </p>
<p>Really, any discussion on this topic is probably futile until you've measured it.</p>
| 7,312 |
<p>Today I had a coworker suggest I refactor my code to use a label statement to control flow through 2 nested for loops I had created. I've never used them before because personally I think they decrease the readability of a program. I am willing to change my mind about using them if the argument is solid enough howev... | <p>Many algorithms are expressed more easily if you can jump across two loops (or a loop containing a switch statement). Don't feel bad about it. On the other hand, it may indicate an overly complex solution. So stand back and look at the problem.</p>
<p>Some people prefer a "single entry, single exit" approach to all... | <p>Personally whenever I need to use nested loops with the innermost one having to break out of all the parent loops, I just write everything in a method with a return statement when my condition is met, it's far more readable and logical.</p>
<p>Example Using method:</p>
<pre class="lang-java prettyprint-override"><co... | 6,864 |
<p>I have a quad core machine and would like to write some code to parse a text file that takes advantage of all four cores. The text file basically contains one record per line.</p>
<p>Multithreading isn't my forte so I'm wondering if anyone could give me some patterns that I might be able to use to parse the file in... | <p>I'd go with your original idea. If you are concerned that the queue might get too large implement a buffer-zone for it (i.e. If is gets above 100 lines the stop reading the file and if it gets below 20 then start reading again. You'd need to do some testing to find the optimal barriers). Make it so that any of the t... | <p>@lomaxx</p>
<blockquote>
<p>@Derek & Mark: I wish there was a way to accept 2 answers. I'm going to have to end up going with Wolfbyte's solution because if I split the file into n sections there is the potential for a thread to come across a batch of "slow" transactions, however if I was processing a file wh... | 2,866 |
<p>How would I change the initial templates created by Xcode when creating a new Cocoa Class.</p>
<p>I am referring to the comments and class name created when using Xcode's new class wizard.</p>
| <p>You wouldn't change the existing templates. In other words, don't <em>modify</em> anything under the <code>/Developer</code> hierarchy (or wherever you installed your developer tools).</p>
<p>Instead, clone the templates you want to have customized variants of. Then change their names and the information in them.... | <p>In XCode 4.5 right click on project, click Show File Inspector, then change Organization name in the file inspector's second tab (Project Document group)</p>
| 5,378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.