instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are:</p> <ol> <li>Find why images are not cached and gzipped direcly from IIS6</li> <li>Write a ...
<p>Best solution is to let IIS do it.</p> <p><a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true" rel="nofollow noreferrer">IIS6 Compression</a> - most likely you need to <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServ...
<p>There's a nice library up on the MSDN Code Gallery that does this. It's called <a href="http://code.msdn.microsoft.com/fastmvc" rel="nofollow noreferrer">FastMVC</a>.</p>
3,777
<p>I'm using IIS in Windows 2003 Server for a SharePoint intranet. <br />External incoming requests will be using the host header <code>portal.mycompany.com</code> and be forced to use SSL.</p> <p>I was wondering if there's a way to set up an alternate host header such as <br /><code>http://internalportal/</code> <br ...
<p>Daniel, keep in mind that just because something is possbile in IIS, and via any number of off box solutions (like hardware load balancers and SSL) doesn't mean that it is supported by SharePoint, <strong>or</strong> that it is implemented in the same way.</p> <p>You can do what you are asking for, however you shou...
<p>Assuming that <a href="http://internalportal/" rel="nofollow noreferrer">http://internalportal/</a> wasn't accessible from outside the company, you could set up two websites in IIS. The first site, configured to use a host header value of 'portal.mycompany.com', would require SSL. The second site, configured to use ...
2,739
<p>There is a <a href="https://web.archive.org/web/20081014140251/http://stackoverflow.uservoice.com:80/pages/general/suggestions/16644" rel="nofollow noreferrer">request</a> to make the SO search default to an AND style functionality over the current OR when multiple terms are used.</p> <p>The official response was:</...
<p>As far as I've seen, it is <strong>not</strong> possible to do AND when using FREETEXT() under SQL 2005 (nor 2008, afaik). </p> <p>A FREETEXT query ignores Boolean, proximity, and wildcard operators by design. However you could do this: </p> <pre><code>WHERE FREETEXT('You gotta love MS-SQL') &gt; 0 AND FREETEXT('...
<p>I just started reading about freetext so bear with me. If what you are trying to do is allow searches for a tag, say VB, also find things tagged as VB6, Visual Basic, VisualBasic and VB.Net, wouldn't those values be set as synonyms in the DB's Thesaurus rather than query parameters?</p> <p>If that is indeed the cas...
4,493
<p>I have wondered for some time, what a nice, clean solution for joining an array of strings might look like. Example: I have ["Alpha", "Beta", "Gamma"] and want to join the strings into one, separated by commas – "Alpha, Beta, Gamma".</p> <p>Now I know that most programming languages offer some kind of join method f...
<p>The most elegant solution i found for problems like this is something like this (in pseudocode)</p> <pre><code>separator = "" foreach(item in stringCollection) { concatenatedString += separator + item separator = "," } </code></pre> <p>You just run the loop and only after the second time around the separat...
<p>The following is no longer language-agnostic (but that doesn't matter for the discussion because the implementation is easily portable to other languages). I tried to implement Luke's (theretically best) solution in an imperative programming language. Take your pick; mine's C#. Not very elegant at all. However, (wit...
8,278
<p>I use Visual Studio 2008. I haven't seen this behavior before and, as far as I know, I didn't change anything in the options.</p> <p>When I press Start debugging all the possibly windows (watch 1 - 4), data sources, properties, registers (to be honest I have not even ever seen these windows before) appear in front...
<p>Visual Studio <em>remembers</em> 2 sets of window layouts, normal mode and debugging mode. My solution is to arrange my normal windows exactly like I want them, then start debugging an application and once again arrange all of the windows the way I want, usually making it as similar to my <em>normal</em> layout as ...
<p>I'm experiencing the same thing - whenever the debugger is running, switching focus back to the IDE immediately caused the debug panel to expand.</p> <p>I ended up just pinning the debug panel so that it always appears when debugging, and just changing its height as needed.</p>
8,153
<p>I’m trying to have <a href="https://www.thingiverse.com/thing:2576121" rel="nofollow noreferrer">this bracket</a> printed, but I don’t know what settings I should use.</p> <p><a href="https://i.stack.imgur.com/yTFRkm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yTFRkm.jpg" alt="Google Home Min...
<p>For such a small item and the small load it will carry, even 50 percent is substantial. Keep in mind that one hundred percent infill is not necessarily stronger. If you need to know why, consider a 'net search for "why not use 100% infill" for more detailed information. The primary foundation for not using 100% infi...
<p>You should use PLA at 215 °C (for better layer adhesion) with 35 percent infill and a shell thickness of 2&nbsp;mm. Shell thickness is what's crucial here, not necessarily infill. The thicker the shell, the stronger the part. This has a much bigger influence on strength than infill does.</p>
754
<p>I'm trying to get the following bit of code to work in LINQPad but am unable to index into a var. Anybody know how to index into a var in LINQ?</p> <pre><code>string[] sa = {"one", "two", "three"}; sa[1].Dump(); var va = sa.Select( (a,i) =&gt; new {Line = a, Index = i}); va[1].Dump(); // Cannot apply indexing with...
<p>As the comment says, you cannot apply indexing with <code>[]</code> to an expression of type <code>System.Collections.Generic.IEnumerable&lt;T&gt;</code>. The IEnumerable interface only supports the method <code>GetEnumerator()</code>. However with LINQ you can call the extension method <code>ElementAt(int)</code>.<...
<p>You can't apply an index to a var unless it's an indexable type:</p> <pre><code>//works because under the hood the C# compiler has converted var to string[] var arrayVar = {"one", "two", "three"}; arrayVar[1].Dump(); //now let's try var selectVar = arrayVar.Select( (a,i) =&gt; new { Line = a }); //or this (I find...
6,678
<p>Is it possible to embed a PowerPoint presentation (.ppt) into a webpage (.xhtml)?</p> <p>This will be used on a local intranet where there is a mix of Internet&nbsp;Explorer&nbsp;6 and Internet&nbsp;Explorer&nbsp;7 only, so no need to consider other browsers.</p> <hr> <p>I've given up... I guess Flash is the way ...
<p>Google Docs can serve up PowerPoint (and PDF) documents in it's document viewer. You don't have to sign up for Google Docs, just upload it to your website, and call it from your page:</p> <pre><code>&lt;iframe src="//docs.google.com/gview?url=https://www.yourwebsite.com/powerpoint.ppt&amp;embedded=true" style="wid...
<p>The first few results on Google all sound like good options:</p> <p><a href="http://www.pptfaq.com/FAQ00708.htm" rel="nofollow noreferrer">http://www.pptfaq.com/FAQ00708.htm</a></p> <p><a href="http://www.webdeveloper.com/forum/showthread.php?t=86212" rel="nofollow noreferrer">http://www.webdeveloper.com/forum/sho...
6,100
<p>I am searching for a Linux software to control the 3000 mW laser engraver depicted below. It's a common model you'd find on AliExpress, Banggood, etc. under different brand names.</p> <p>I have already tried <a href="https://github.com/AxelTB/nejePrint" rel="noreferrer">nejePrint</a>, <a href="https://github.com/La...
<p>A program that lists as functional with Linux is <a href="https://lightburnsoftware.com/" rel="noreferrer">Lightburn</a>. It's new to the laser engraving world and supports GRBL type controllers as well as Ruida brand and possibly a few others. If you can determine your controller, you're a step ahead of the game.</...
<p>I also have one, when you plug it on your linux computer, there is a CH340G usb-serial chip inside, a serial port should be available at /dev/ttyUSB0, and you can send a right BMP file via this serial port.</p> <p>Maybe EzGraver would work?</p> <p><a href="https://github.com/camrein/EzGraver" rel="nofollow norefer...
1,350
<p>A Windows Forms application of ours pulls records from a view on SQL Server through ADO.NET and a SOAP web service, displaying them in a data grid. We have had several cases with ~25,000 rows, which works relatively smoothly, but a potential customer needs to have many times that much in a single list.</p> <p>To fi...
<p>For data for testing CRM type tables, I highly recommend <a href="http://www.fakenamegenerator.com" rel="nofollow noreferrer">fakenamegenerator.com</a>, you can get 40,000 fake names for free.</p>
<p>If you want results you can rely on you need to make the testing scenario as realistic as possible, which makes option 1 by far your best bet. As you point out if you get results that aren't good enough with the other options you won't be sure that it wasn't due to the different database behaviour.</p> <p>How you ...
5,757
<p>Python has this wonderful way of handling string substitutions using dictionaries:</p> <pre><code>&gt;&gt;&gt; 'The %(site)s site %(adj)s because it %(adj)s' % {'site':'Stackoverflow', 'adj':'rocks'} 'The Stackoverflow site rocks because it rocks' </code></pre> <p>I love this because you can specify a value once i...
<pre><code>function subst($str, $dict){ return preg_replace(array_map(create_function('$a', 'return "/%\\($a\\)s/";'), array_keys($dict)), array_values($dict), $str); } </code></pre> <p>You call it like so:</p> <pre><code>echo subst('The %(site)s site %(adj)s because it %(adj)s', array('site'=&gt;'Stackoverflow'...
<p>Some of the user-contributed notes and functions in <a href="http://us3.php.net/sprintf" rel="nofollow noreferrer">PHP's documentation for sprintf</a> come quite close.</p> <p>Note: search the page for "sprintf2".</p>
4,781
<p>I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts, especially the ones for Sharepoint 2007?</p> <p>As Web Parts are a layer on another layer of technology, getting resource usage, open handles and stuff only for the web part seems to be a bit difficult.</p> <p>Does any...
<p>Back when we started with SP2003, we used to worry about not closing connection in apps or web parts. We used the following query to check if the base number of connections (not counting the initial spike) would increase as the app is used on the development server:</p> <p>SELECT hostname, sysdatabases.name , sysp...
<p>I have found seperating out all the business logic in to a seperate DLL that is easily unit testable has been the easiest method for me. But to be honest there is really no good way that I have found, besides what I have just mentioned. The same has been true for me with Facebook applications recently. I think th...
4,020
<p>I need to store products for an e-commerce solution in a database. Each product should have descriptive information, such as name, description etc.</p> <p>I need any product to be localized to x number of languages.</p> <p>What I've done so far, is to make any column that should be localized and <code>nvarchar(MAX...
<p>You should store the current language somewhere (in a <a href="http://www.yoda.arachsys.com/csharp/singleton.html" rel="nofollow noreferrer">singleton</a>, for instance) and in the product.Name property use the language setting to get the correct string. This way you only have to write the language specific code on...
<p>This is basically the approach we took with Microsoft Commerce Server 2002. Yeah indexed views will help your performance.</p>
4,818
<p>For example, to make a DIY cartesian 3d printer you <strong>could</strong> use/do the following:</p> <ul> <li><p>Create G-code using a program of your choice.</p></li> <li><p>Load it into Universal G-code Sender (GRBL).</p></li> <li><p>Pass it into an Arduino with GRBL.</p></li> <li><p>The arduino can pass the inst...
<p>The short answer is that the handling of the non-cartesian design is done by the motion-control firmware running on the Arduino.</p> <p>The long answer:</p> <p>I don't believe GRBL supports non-cartesian designs, and it is not commonly used for printers. It is more often used for mills, routers, or laser machines....
<p>Every 3D printer or machine tool that is commanded through G-code must interpret the G-code in terms of the particular mechanism. Even a Cartesian machine in which there is a clear X, Y, and Z axis, each with independent actuators, interprets the G-code and adjusts for the scale factors, considers the current kinet...
867
<p>When I have overhangs in my model, Cura colors them red. However, I noticed if I make layer thickness thinner, the red area is reduced or disappears. </p> <p>This could mean that thinner layer thickness is better for overhang, but it could also mean that a larger ratio of line width to layer thickness is better. It...
<p>A wide line works if there is something below it to squeeze the filament against, but if you don't have a full layer below it, it will stay thinner and it will droop. I would not use extreme ratios on overhangs. Still, do a parametric test: a overhang tower (a compact one) at different line widths and layer heights....
<p>In terms of Cura's model for showing overhangs, I'm nearly sure it's just the ratio - rise over run, or rather run over rise. And indeed that's what makes sense mathematically:</p> <p>At least some portion of the wall extrusion in layer N+1 needs to sit on top of the corresponding wall extrusion in layer N. For a g...
1,663
<p>I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge?</p>
<p>GPS, the Global Positioning System run by the United States Military, is free for civilian use, though the reality is that we're paying for it with tax dollars.</p> <p>However, GPS on cell phones is a bit more murky. In general, it won't cost you anything to turn on the GPS in your cell phone, but when you get a l...
<p>There's 3 satellites at least that you must be able to receive from of the 24-32 out there, and they each broadcast a time from a synchronized atomic clock. The differences in those times that you receive at any one time tell you how long the broadcast took to reach you, and thus where you are in relation to the sat...
5,371
<p>I am converting an old Makerbot Replicator 2 to Marlin Firmware and everything works. The printer heats up, auto bed levels, and starts the print. However, after a couple minutes (usually after the 1st or 2nd layer), the printer crashes and stops. It does not continue printing and I have to restart it again. It cras...
<p>I see a couple likely culprits for a hardcrash like this</p> <ul> <li>problems with the power supply. If the power supply does not provide enough voltage an/or current to the board, this can lead to a lockup of the board.</li> <li>temperature issues of the board. If the board overheats, it could fail to execute prop...
<p>Few things to try,</p> <p><strong>Check G-Code</strong> - Verify that the slicer is not the problem, slice using some other program / make a new default profile and re-slice.</p> <p><strong>3D File</strong> - Also In parallel with the above point, I would get a standard test cube STL to start with. This will be a si...
1,714
<p>I'm doing a little bit of work on a horrid piece of software built by Bangalores best.</p> <p>It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(</p> <p>I'm getting this message when it tries to connect to my local database:</p> <...
<p>I ran into this a long time ago with working in ASP. I found this knowledge base article and it helped me out. I hope it solves your problem.</p> <p><a href="http://support.microsoft.com/kb/269495" rel="nofollow noreferrer">http://support.microsoft.com/kb/269495</a></p> <p>If this doesn't work and everything che...
<p>As a side note, <a href="http://connectionstrings.com" rel="nofollow noreferrer">connectionstrings.com</a> is a great site so you don't have to remember all that connection string syntax.</p>
4,438
<p>I'm sorry if my question is so long and technical but I think it's so important other people will be interested about it</p> <p>I was looking for a way to separate clearly some softwares internals from their representation in c++</p> <p>I have a generic parameter class (to be later stored in a container) that can ...
<p>For a generic implementation of <a href="http://en.wikipedia.org/wiki/Visitor_pattern" rel="nofollow noreferrer">Vistor</a>, I'd suggest the <a href="http://loki-lib.sourceforge.net/index.php?n=Pattern.Visitor" rel="nofollow noreferrer">Loki Visitor</a>, part of the <a href="http://loki-lib.sourceforge.net/index.php...
<p>If I understand this correctly...</p> <p>We had a object that could use different hardware options. To facilitate this we used a abstract interface of Device. Device had a bunch of functions that would be fired on certain events. The use would be the same but the various implementations of the Device would either h...
5,186
<p><strong>What "Hidden Features" of JavaScript do you think every programmer should know?</strong></p> <p>After having seen the excellent quality of the answers to the following questions I thought it was time to ask it for JavaScript.</p> <ul> <li><a href="https://stackoverflow.com/questions/954327/">Hidden Feature...
<p>You don't need to define any parameters for a function. You can just use the function's <code>arguments</code> array-like object.</p> <pre><code>function sum() { var retval = 0; for (var i = 0, len = arguments.length; i &lt; len; ++i) { retval += arguments[i]; } return retval; } sum(1, 2, 3...
<p>Well, it's not much of a feature, but it is very useful:</p> <p>Shows selectable and formatted alerts:</p> <pre><code>alert(prompt('',something.innerHTML )); </code></pre>
8,621
<p>I can't seem to find Developer Express' version of the <code>LinkButton</code>. (The Windows Forms linkbutton, not the <code>ASP.NET</code> linkbutton.) <code>HyperLinkEdit</code> doesn't seem to be what I'm looking for since it looks like a TextEdit/TextBox.</p> <p>Anyone know what their version of it is? I'm u...
<p>The control is called the HyperLinkEdit. You have to adjust the properties to get it to behave like the System.Windows.Forms control like so:</p> <pre><code> control.BorderStyle = BorderStyles.NoBorder; control.Properties.Appearance.BackColor = Color.Transparent; control.Properties.AppearanceFocused.Bac...
<p>You should probably just use the standard ASP.Net LinkButton, unless it's really missing something you need.</p>
2,571
<p>In OpenSCAD, I am trying to make a linear_extrude on a shape imported from an svg. The svg file contains multiple path. I would like to scale each path separately. I have tried the following code, but the whole import is considered a single shape resulting in the image below.</p> <pre><code>linear_extrude(height = 5...
<p>Lame solution: creating stepped pyramid with offset. I realized that scale will not worked for motives with holes inside. Offset seems then more appropriate than scale for my application (creation of stamps)</p> <p>It takes ages to render, but it could be enough for simple patterns. Any better solution are still wel...
<p>One option is to use <code>minkowski()</code> to combine the svg with a cone. On the positive side, it gives a rather nice result, but the downsides are:</p> <ul> <li>it's pretty slow</li> <li>it fattens the bottom rather than shrinking the top, so depending on your needs you may have to invert the image, run <code>...
1,810
<p>I just order myself an Ender 3 Pro which will come by the end of the week. Before it arrives I want to be ready to flash a bootloader onto it.</p> <p>I was wondering what other options there are to flashing except using an Arduino?</p> <p>I have a bunch of ESP8266/ESP32 and a <a href="https://www.banggood.com/FT23...
<p>What you need to is called a ICSP or ISP: <a href="https://en.wikipedia.org/wiki/In-system_programming" rel="noreferrer">in-circuit serial programmer or in-system programmer</a>, which excludes the USB to TTL device you own.</p> <p>I've never used an ESP8266 as ICSP but it seems there are <a href="https://arduino.s...
<p>You can do AVR programming using USB-TTL adapters. This relies on bit-banging, i.e. emulating the programming protocol by using the serial control lines as general purpose IO.</p> <p>But this has a few caveats:</p> <ul> <li>USB-TTL adapters limit the speed of control line changes. So the programming will be very s...
1,508
<p>I would like to print multiple parts continuously (non-interactively), so I can leave the printer alone for a longer time. So after finish, parts could be moved somehow out from the printing area, so the next can start.</p> <p>Are there any methods of achieving that with standard desktop printers without having to ...
<p>The only thing I can think of off hand is an old mod for the early MakerBot machines. It first was released for the Thing-O'-Matic I believe, but is compatible with Replicator 1 machines (and its knock-offs). Here's the <a href="http://www.thingiverse.com/thing:4056" rel="noreferrer">Thingiverse page</a>, but look u...
<p>I Don't really think that it is possible without hardware modifications, or maybe some small parts that will fit in the bed of the printer all on the same time</p>
106
<p>I have a website that is perfectely centered aligned. The CSS code works fine. The problem doesn't really have to do with CSS. I have headers for each page that perfectely match eachother.</p> <p>However, when the content gets larger, Opera and FireFox show a scrollbar at the left so you can scroll to the content n...
<p>I use </p> <pre><code>html { overflow-y: scroll; } </code></pre> <p>To standardize the scrollbar behavior in IE and FF</p>
<p>Are you aligning with percentage widths or fixed widths? I'm also guessing you're applying a background to the body - I've had this problem myself.</p> <p>It'll be much easier to help you if you upload the page so we can see the source code however.</p>
4,654
<p>I'm currently working on an application with a frontend written in Adobe Flex 3. I'm aware of <a href="http://code.google.com/p/as3flexunitlib/" rel="noreferrer">FlexUnit</a> but what I'd really like is a unit test runner for Ant/NAnt and a runner that integrates with the Flex Builder IDE (AKA Eclipse). Does one exi...
<p>The <a href="http://code.google.com/p/dpuint/" rel="noreferrer">dpUint</a> testing framework has a test runner built with AIR which can be integrated with a build script.</p> <p>There is also my <a href="http://developer.iconara.net/objectlib/flexunitautomation.html" rel="noreferrer">FlexUnit</a> automation kit whi...
<p>An alternative to FlexUnit is the <a href="http://www.asunit.org/" rel="nofollow noreferrer">AsUnit</a> testing tools. There are versions for actionscript 2 and 3. It also has good integration with <a href="http://www.projectsprouts.org/" rel="nofollow noreferrer">Project Sprouts</a>, which is a build tool for Flex ...
2,440
<p>What's the best way to copy a file from a network share to the local file system using a Windows batch file? Normally, I would use "net use *" but using this approach how can I get the drive letter?</p>
<p>Can you just use the full UNC path to the file?</p> <pre><code>copy \\myserver\myshare\myfolder\myfile.txt c:\myfiles </code></pre>
<p>You can also use <code>xcopy</code> and <code>robocopy</code>:</p> <pre><code>xcopy "\\server\share\path" "destination" </code></pre> <pre><code>robocopy "\\server\share\path" "destination" </code></pre>
6,879
<p>I would like to use an add-in like simple-modal or the dialog add-in in the UI kit. However, how do I use these or any other and get a result back. Basically I want the modal to do some AJAX interaction with the server and return the result for the calling code to do some stuff with.</p>
<p>Here is how the confirm window works on simpleModal:</p> <pre><code>$(document).ready(function () { $('#confirmDialog input:eq(0)').click(function (e) { e.preventDefault(); // example of calling the confirm function // you must use a callback function to perform the "yes" action confirm("Continue...
<p>Since the modal dialog is on the page, you're free to set any document variable you want. However all of the modal dialog scripts I've seen included a demo using the return value, so it's likely on that page.</p> <p>(the site is blocked for me otherwise I'd look)</p>
7,272
<p>I have a MySQL table with approximately 3000 rows per user. One of the columns is a datetime field, which is mutable, so the rows aren't in chronological order.</p> <p>I'd like to visualize the time distribution in a chart, so I need a number of individual datapoints. 20 datapoints would be enough.</p> <p>I could ...
<p>Michal Sznajder almost had it, but you can't use column aliases in a WHERE clause in SQL. So you have to wrap it as a derived table. I tried this and it returns 20 rows:</p> <pre><code>SELECT * FROM ( SELECT @rownum:=@rownum+1 AS rownum, e.* FROM (SELECT @rownum := 0) r, entries e) AS e2 WHERE uid = ? AND...
<p><a href="https://stackoverflow.com/questions/3682/sql-distribution-of-table-in-time#3691">@Michal</a></p> <p>For whatever reason, your example only works when the where @recnum uses a less than operator. I think when the where filters out a row, the rownum doesn't get incremented, and it can't match anything else....
2,575
<p>I've recently started using Eclipse Ganymede CDT for C development and I couldn't like it more. I'm aware the learning curve could be sort of pronounced, therefore and with your help, my goal is to flatten it as much as possible. I'm looking for the best hacks, hints, tips, tricks, and best practices to really unlea...
<p><strong>Accurate Indexing</strong></p> <p>With CDT you should be sure to enable the &quot;Full Indexing&quot; option rather than the &quot;Fast Indexing&quot; default. It's not perceptibly slower on modern hardware and it does a much better job. In that vein, you should be sure to enable semantic highlighting. Th...
<p><strong>If the Java Developer Tools aren't installed the Spellcheck won't work.</strong></p> <p>The Spellcheck functionality is dependent upon the Java Development Tools being installed. This can be a perplexing issue if you just install the C Development Tools exclusively, because it gives no reason for the Spell ...
9,469
<p>I have an application running under Windows XP, and I'm accessing the Processor and Memory performance counters. When I try to run the same code and access them on XP Embedded, the counters don't seem to be present. They are present in the image - I can see them all in perfmon. What's the missing piece here?</p>
<p>Have you added all the WMI components? As far as I know, you need all the WMI components to access the counters!</p> <blockquote> <p>The Performance Counter Windows Management Instrumentation (WMI) Provider component provides a bridge between the performance registry interface and the WMI interface. This componen...
<p>Have you added all the WMI components? As far as I know, you need all the WMI components to access the counters!</p> <blockquote> <p>The Performance Counter Windows Management Instrumentation (WMI) Provider component provides a bridge between the performance registry interface and the WMI interface. This componen...
8,064
<p>A plastic gear of an older DVD player broke. I always read about being 3D printing a "repair revolution". So I looked for a template to give to some printing service, but I found none (and nothing close to it).</p> <p>Could you please explain me, what steps a layman should take to get the gear piece replaced using ...
<p>If you have the remaining pieces of the gear and enough remains to determine certain measurements, one can either engineer the gear using a number of gear modeling designs, or one can take measurements directly from the parts and engineer a raw design.</p> <p>If the gear you have is not particularly peculiar, it is...
<p>The only 'layman's' option is to find an existing design which solves your problem. If you are lucky, and the product you have has a common failure mode, someone else might have a) solved the same problem already, and b) posted their design online.</p> <p>Sites such as <a href="http://www.thingiverse.com/search?q=d...
529
<p>I am trying to snoop on a log file that an application is writing to.</p> <p>I have successfully hooked createfile with the detours library from MSR, but createfile never seems to be called with file I am interested in snooping on. I have also tried hooking openfile with the same results.</p> <p>I am not an experie...
<p>You can use Sysinternal's <a href="http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx" rel="nofollow noreferrer">FileMon</a>. It is an excellent monitor that can tell you exactly which file-related system calls are being made and what are the parameters.</p> <p>I think that this approach is much easier ...
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" rel="nofollow noreferrer">Process Monitor</a> from sysinternals could help too.</p>
3,475
<p>Flsun 3D Cube; Marlin 1.1.1; main board: Makerbase MKS Gen_L V1.0; running from either Repetier or OctoPrint.</p> <p>I was recently obliged to replace the main board when it stopped powering the heated bed. I got the new main board - same make, version, etc - got everything setup just as it was before, but the bed ...
<p>Considering:</p> <blockquote> <p>Multimeter shows zero across the board's heat bed contacts</p> </blockquote> <p>this implies that </p> <ul> <li>If you measured <strong>resistance</strong>, the heated bed has no resistance. Basically this implies that the bed has a short. This might be the reason why it is not ...
<p>Since the bed was warm when you connected to 12 V that means the bed and the wiring are good. It sounds like your multimeter is not too accurate, with a reading of 0.5 Ω (or you measured accidentally some other circuit), but no worries. </p> <p>Since both boards do not power the bed, it seems like it could be a fir...
1,223
<p>I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information?</p> <p>I'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not sure if this has an API) etc.</p>
<p>See the following links:</p> <p><a href="http://www.blogger.com/developers/api/1_docs/" rel="nofollow noreferrer">Blogger</a></p> <p><a href="http://codex.wordpress.org/Plugin_API" rel="nofollow noreferrer">Wordpress</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/bb447732.aspx" rel="nofollow noreferr...
<p>The Blogger API link you provided says:</p> <blockquote> <p>This documentation is provided for historical interest only. The Blogger 1.0 API is no longer supported and must not be used for new client development. Please use our GData API instead.</p> </blockquote> <p>So the correct one probably is: <a h...
4,435
<p><a href="https://stackoverflow.com/questions/12073/what-is-the-best-xml-editor">https://stackoverflow.com/questions/12073/what-is-the-best-xml-editor</a> was a great question regarding XML editors on Windows. What about on OS X?</p> <p>Oxygen is feature complete, but, it's a Java app and a bit clunky on OSX. It's ...
<p><a href="http://www.editix.com/" rel="nofollow noreferrer">EditiX XML Editor</a> (starts at $60) or maybe <a href="http://www.oxygenxml.com/" rel="nofollow noreferrer">oXygen</a> ($299 is less than $300, right).</p> <p>You'll find a big list of the optiosn over at <a href="http://xmacl.com/" rel="nofollow noreferre...
<p>Netbeans could be a good and free choice too.</p>
6,796
<p>I've gone back and forth between having an organized inbox and having an inbox with absolutely everything I've received in it. </p> <p>Would you recommend leaving everything in an inbox, or organize it? If you organize it, is there any method to your madness or possibly an Outlook (2003) plug-in to aid in this ta...
<p>I would recommend following the <a href="http://video.google.com/videoplay?docid=973149761529535925" rel="nofollow noreferrer">inbox zero</a> approach advocated by 43 folders. Joel Spolsky apparently uses it and a lot of people feel it's a great way of decluttering and organising your email life :-).</p>
<p>The best place to start with getting control of your email is definitely Merlin Mann's excellent <a href="http://www.43folders.com/izero" rel="nofollow noreferrer">Inbox Zero</a> series. In particular his <a href="http://video.google.com/videoplay?docid=973149761529535925&amp;hl=en" rel="nofollow noreferrer">Google...
5,904
<p>I'm trying to find out how much memory my own .Net server process is using (for monitoring and logging purposes).</p> <p>I'm using:</p> <pre><code>Process.GetCurrentProcess().PrivateMemorySize64 </code></pre> <p>However, the Process object has several different properties that let me read the memory space used: P...
<p>If you want to know how much the GC uses try:</p> <pre><code>GC.GetTotalMemory(true) </code></pre> <p>If you want to know what your process uses from Windows (VM Size column in TaskManager) try:</p> <pre><code>Process.GetCurrentProcess().PrivateMemorySize64 </code></pre> <p>If you want to know what your process ...
<p>Working set isn't a good property to use. From what I gather, it includes everything the process can touch, even libraries shared by several processes, so you're seeing double-counted bytes in that counter. Private memory is a much better counter to look at.</p>
5,099
<p>Is there any benefit in using a <code>&lt;blockquote&gt;</code> element over a <code>&lt;div&gt;</code>? I was looking at a website's markup to learn CSS and I couldn't figure out why the <code>&lt;blockquote&gt;</code> was being used.</p> <p>EDIT: Yeah sorry I didn't clarify, it was used to hold the <code>&lt;div&...
<p>In theory, HTML should be as "semantic" as possible - meaning that every element should indicate something about its content. <code>&lt;h1&gt;</code><em>s</em> should enclose the most important headline; <code>&lt;p&gt;</code><em>s</em> should surround paragraphs; <code>&lt;em&gt;</code> should indicate emphasis, ...
<p>As mentioned, <code>&lt;blockquote&gt;</code> is for quoting. Similarly you will use several <code>&lt;p&gt;</code> blocks for paragraphs within one <code>&lt;div&gt;</code> that holds page content or whatever. HTML5 proposal will have lot more block elements (i.e same as divs) which purpose will be to add a semanti...
6,450
<p>When you use Zedgraph for linegraphs and set IsSmooth to true, the lines are nicely curved instead of having hard corners/angles.</p> <p>While this looks much better for most graphs -in my humble opinion- there is a small catch. The smoothing algorithm makes the line take a little 'dive' or 'bump' before going upwa...
<p>No simple answer for this. Keeping the tension near zero will be your simplest solution.</p> <p>ZedGraph uses GDI's DrawCurve tension parameter to apply smoothness, which is probably Hermite Interpolation. You can try to implement your own Cosine Interpolation, which will keep local extremes because of its nature...
<p>You could try to alter the myCurve.Line.SmoothTension property up or down and see if that helps.</p>
8,543
<p>It seems like anything you can do with bytecode you can do just as easily and much faster in native code. In theory, you could even retain platform and language independence by distributing programs and libraries in bytecode then compiling to native code at installation, rather than JITing it.</p> <p>So in general,...
<p>Hank Shiffman from SGI said (a long time ago, but it's till true):</p> <blockquote> <p>There are three advantages of Java using byte code instead of going to the native code of the system:</p> <ol> <li><p><strong>Portability</strong>: Each kind of computer has its unique instruction set. While some p...
<p>Portability and platform independence are probably the most notable advantages of bytecode over native code. </p>
7,052
<p>I am developing an <a href="https://github.com/Stypox/image-to-gcode" rel="nofollow noreferrer">image to gcode program</a>, that would recognize edges and generate corresponding G-code to be sent to a plotter. I was able to detect edges using the <a href="https://en.wikipedia.org/wiki/Sobel_operator" rel="nofollow n...
<p>Quote of comment of <a href="https://3dprinting.stackexchange.com/questions/11956/converting-an-undirected-graph-to-optimal-g-code-paths#comment21885_11956">R.. GitHub STOP HELPING ICE</a> on question reads: </p> <blockquote> <p>Pretty sure it is NP-complete (equivalent to travelling salesman problem), no? – </p...
<p>If you can save your plot as a dxf, you can use Repetrel to generate gcode with our "find nearest neighbor" optimizing. You can download it from <a href="http://hyrel3d.net" rel="nofollow noreferrer">http://hyrel3d.net</a> - the full install instructions start at <a href="http://hyrel3d.net/wiki/index.php/Installati...
1,579
<p>I have built a RepRap Prusa i2 a while back. It worked for a while, but then I moved the printer from place to place and after a while I noticed that the printer's bed is not heating anymore. The thermistor shows the temperature (room temperature), but the bed is not heating. The wires are connected and the heated ...
<h1>diagnosing a heated bed</h1> <p>Switch the hot end and the heater bed wires on the board. See if there is a difference. (Note that it will not reach a thermal limit when plugged in this way! So don't leave it on too long!)</p> <p>After that, if you see that your heat increases with the hot end's wires and the hot e...
<p>It's probably a fuse or the MOSFET fried? Try checking for continuity on the fuse and voltage on the MOSFET.</p>
386
<p>I want to print the first 10000 prime numbers. Can anyone give me the most efficient code for this? Clarifications:</p> <ol> <li>It does not matter if your code is inefficient for n >10000.</li> <li>The size of the code does not matter.</li> <li>You cannot just hard code the values in any manner.</li> </ol>
<p><a href="http://en.wikipedia.org/wiki/Sieve_of_Atkin" rel="noreferrer">The Sieve of Atkin</a> is probably what you're looking for, its upper bound running time is O(N/log log N).</p> <p>If you only run the numbers 1 more and 1 less than the multiples of 6, it could be even faster, as all prime numbers above 3 are 1...
<pre><code>using System; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int n, i = 3, j, c; Console.WriteLine("Please enter your integer: "); n = Convert.ToInt32(Console.ReadLine()); if (n &gt;= 1) { ...
2,304
<p>I’ve got this proximity sensor which is a 5 V, it doesn’t say it can be used over 5 V. Can I use a buck converter or is it possible to wire it up direct to a 5 V source on the Ender 3 V2?</p> <p>What I don’t understand is where to wire it direct to 5 V on the printer or if I use a buck converter then where does the ...
<p>PLA is a forgiving filament, you can even print such filament without a heated bed. Although there are differences in quality between brands, PLA shouldn't need a raft to be printed. Hatchbox filament is not considered as a low quality type of filament; it is economical and has been around since 2013. A raft is a st...
<p>Please try one (or more) of the following:</p> <ol> <li><p>Change the temperature of your heated bed (50 - 60 °C)</p> </li> <li><p>Check your nozzle height (0.15 - 0.25 mm is what I use)</p> </li> <li><p>Make sure your bed is level (Maybe use a leaving stick (or whatever those bubble things are called))</p> </li> <l...
1,935
<p>I'd like to make a debug logging function with the same parameters as <code>printf</code>. But one that can be removed by the pre-processor during optimized builds.</p> <p>For example:</p> <pre><code>Debug_Print("Warning: value %d &gt; 3!\n", value); </code></pre> <p>I've looked at variadic macros but those aren...
<p>I still do it the old way, by defining a macro (XTRACE, below) which correlates to either a no-op or a function call with a variable argument list. Internally, call vsnprintf so you can keep the printf syntax:</p> <pre><code>#include &lt;stdio.h&gt; void XTrace0(LPCTSTR lpszText) { ::OutputDebugString(lpszText)...
<p>Having come across the problem today, my solution is the following macro:</p> <pre><code> static TCHAR __DEBUG_BUF[1024]; #define DLog(fmt, ...) swprintf(__DEBUG_BUF, fmt, ##__VA_ARGS__); OutputDebugString(__DEBUG_BUF) </code></pre> <p>You can then call the function like this:</p> <pre><code> int valu...
3,604
<p>There is previous little on the google on this subject other than people asking this very same question.</p> <p>How would I get started writing my own firewall?</p> <p>I'm looking to write one for the windows platform but I would also be interested in this information for other operating systems too. ­­­­­­­­­­­­­...
<p>For Windows 2000/XP there is an article with examples on CodeProject <a href="http://www.codeproject.com/KB/IP/drvfltip.aspx" rel="noreferrer">Developing Firewalls for Windows 2000/XP</a><br><br>For Vista I think you will need to use <a href="http://www.microsoft.com/whdc/device/network/wfp.mspx" rel="noreferrer">Wi...
<p>The usual approach is to use API hooking. Google can teach you that. Just hook all important networking stuff, like <code>connect</code>'s and <code>listens</code>'s, and refuse what you want.</p>
3,896
<p>I have a string that has some Environment.Newline in it. I'd like to strip those from the string and instead, replace the Newline with something like a comma. </p> <p>What would be, in your opinion, the best way to do this using C#.NET 2.0?</p>
<p>Why not:</p> <pre><code>string s = "foobar\ngork"; string v = s.Replace(Environment.NewLine,","); System.Console.WriteLine(v); </code></pre>
<p>The best way is the builtin way: Use <code>string.Replace</code>. Why do you need alternatives?</p>
4,499
<p>I have a file (fasta file to be specific) that I would like to index, so that I can quickly locate any substring within the file and then find the location within the original fasta file.</p> <p>This would be easy to do in many cases, using a Trie or substring array, unfortunately the strings I need to index are 80...
<p>In some languages programmers have access to <strong><em>"direct byte arrays"</em></strong> or <strong><em>"<a href="http://en.wikipedia.org/wiki/Memory-mapped_file" rel="nofollow noreferrer">memory maps</a>"</em></strong>, which are provided by the OS. In java we have <strong><a href="http://java.sun.com/j2se/1.4....
<p>I talked to a few co-workers and they just use VIM/Grep to search when they need to. Most of the time I wouldn't expect someone to search for a substring like this though.</p> <p>But I don't see why MS Desktop search or spotlight or google's equivalent can't help you here.</p> <p>My recommendation is splitting the...
7,662
<p>I currently use a DataTable to get results from a database which I can use in my code.</p> <p>However, many example on the web show using a DataSet instead and accessing the table(s) through the collections method.</p> <p>Is there any advantage, performance wise or otherwise, of using DataSets or DataTables as a s...
<p>It really depends on the sort of data you're bringing back. Since a DataSet is (in effect) just a collection of DataTable objects, you can return multiple distinct sets of data into a single, and therefore more manageable, object. </p> <p>Performance-wise, you're more likely to get inefficiency from unoptimized q...
<p>A DataTable object represents tabular data as an in-memory, tabular cache of rows, columns, and constraints. The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects.</p>
2,442
<p>I just recently purchased a new MightyBoard (Rev G) for my Replicator that requires a new power supply. </p> <p>The power supply for the Rev E was a 24&nbsp;V/9.2&nbsp;A which was necessary for the dual extruders and heated bed. I know I need a 24&nbsp;V power supply, but should I be concerned about the amperage? W...
<p>I suggest looking at the maximum amperage draw for all components that could be on at one time, and then find a power supply that can supply at least 20% more current. You would never want to get a supply rated for lower current than your max draw, because then it will affect the torque or your motors, or the tempe...
<p>A short, figurative answer from the electronical point of view:</p> <p>A <strong>power supply</strong> (an an analogy you can view it as a water pump) as used by 3D printers is usually supplying a fixed <strong>voltage</strong> (a constant pressure going into your pipe system), in your case 24V.</p> <p>The given <...
262
<p>In <b>Prototype</b> I can show a "loading..." image with this code:</p> <pre><code>var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onLoading: showLoad, onComplete: showResponse} ); function showLoad () { ... } </code></pre> <p>In <b>jQuery</b>, I can load a server page into an element w...
<p>There are a couple of ways. My preferred way is to attach a function to the ajaxStart/Stop events on the element itself.</p> <pre><code>$('#loadingDiv') .hide() // Hide it initially .ajaxStart(function() { $(this).show(); }) .ajaxStop(function() { $(this).hide(); }) ; </code></p...
<p>You can always use <a href="http://malsup.com/jquery/block/#overview" rel="nofollow noreferrer">Block UI jQuery plugin</a> which does everything for you, and it even blocks the page of any input while the ajax is loading. In case that the plugin seems to not been working, you can read about the right way to use it <...
9,397
<p>What are the most user-friendly color combinations for Web 2.0 websites, such as background, button colors, etc.? </p>
<p><a href="http://www.colorschemer.com/online.html" rel="noreferrer">ColorSchemer</a> will suggest good schemes for you.</p> <p>If you want to try something out on your own, try <a href="http://www.colorcombos.com/" rel="noreferrer">Color Combinations</a>.</p>
<p><a href="http://useit.mondosearch.com/cgi-bin/MsmFind.exe?QUERY=color" rel="nofollow noreferrer">search for color on useit</a> </p> <p><a href="http://www.boxesandarrows.com/search?q=color" rel="nofollow noreferrer">search for color on boxesandarrows</a></p> <p>There has been loads of research on this sort of stuf...
4,799
<p>Given the following example, why do I have to explicitly use the statement <code>b-&gt;A::DoSomething()</code> rather than just <code>b-&gt;DoSomething()</code>?</p> <p>Shouldn't the compiler's overload resolution figure out which method I'm talking about?</p> <p>I'm using Microsoft VS 2005. (Note: using virtual d...
<p>The two “overloads” aren't in the same scope. By default, the compiler only considers the smallest possible name scope until it finds a name match. Argument matching is done <em>afterwards</em>. In your case this means that the compiler sees <code>B::DoSomething</code>. It then tries to match the argument list, whic...
<p>When searching up the inheritance tree for the function to use, C++ uses the name without arguments, once it has found any definition it stops, then examines the arguments. In the example given, it stops in class B. In order to be able to do what you are after, class B should be defined like this:</p> <pre><code>cl...
9,756
<p>When building a VS 2008 solution with 19 projects I sometimes get:</p> <pre><code>The "GenerateResource" task failed unexpectedly. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapaci...
<p>From <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/5154ef26-ccfe-44d5-a322-6804b61ac774/systemoutofmemoryexception?forum=clr" rel="nofollow noreferrer">https://social.msdn.microsoft.com/Forums/vstudio/en-US/5154ef26-ccfe-44d5-a322-6804b61ac774/systemoutofmemoryexception?forum=clr</a>:</p> <p>Try d...
<p>I have already passed by this erros sometimes. All you must do is delete all files in the obj path. After that clean and rebuild your solution and it´s done.</p>
3,580
<p>I saw many questions asking 'how' to unit test in a specific language, but no question asking 'what', 'why', and 'when'.</p> <ul> <li>What is it?</li> <li>What does it do for me?</li> <li>Why should I use it?</li> <li>When should I use it (also when not)?</li> <li>What are some common pitfalls and misconceptions</l...
<p>Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are:</p> <ul> <li>Running the tests becomes automate-able and repeatable</li> <li>You can test at a much more granular level than point-and-click testing via a GUI</li> </ul> <p>Note...
<p>Unit-testing and TDD in general enables you to have shorter feedback cycles about the software you are writing. Instead of having a large test phase at the very end of the implementation, you incrementally test everything you write. This increases code quality very much, as you immediately see, where you might have ...
2,377
<p>I'm having trouble getting the following to work in SQL Server 2k, but it works in 2k5:</p> <pre><code>--works in 2k5, not in 2k create view foo as SELECT usertable.legacyCSVVarcharCol as testvar FROM usertable WHERE rsrcID in ( select val from dbo.fnSplitStringToInt(usertable...
<p>Passing column-values to a table-valued user-defined function is not supported in SQL Server 2000, you can only use constants, so the following (simpler version) would also fail:</p> <pre><code>SELECT *, (SELECT TOP 1 val FROM dbo.fnSplitStringToInt(usertable.legacyCSVVarcharCol, ',')) FROM usertable </code></pre> ...
<p>I don't think functions can have default values in functions in SS2K.</p> <p>What happens when you run this SQL in SS2K?</p> <pre><code>select val from dbo.fnSplitStringToInt('1,2,3', default) </code></pre>
4,603
<p>I read that the best way of removing ABS was to let the temperature at the hot end to drop to around 190deg c then a sharp pull. This worked really well. I am trying to print with PLA but no matter what temperature I drop the hot end to I get left with a length of PLA in the feeder tube. OK I can heat the hot end an...
<p>One resource you can use is called the <a href="https://rigid.ink/blogs/news/how-to-use-3d-printer-cleaning-filament" rel="nofollow noreferrer">nylon cleaning method</a>. It works by setting nylon filament temperatures, pushing nylon filament into the nozzle until only nylon is extruding, then cooling the hot end to...
<p>In line w/ Fred.U's answer, I've been pretty comfortable with the following sequence. Assume a cold start with a filament in the feeder (and cold gunk in the hotend).<br> 1) bring the hotend up to 5 degreesC over your usual extrusion temp for the filament currently in place.<br> 2) If the filament doesn't pull out...
813
<p>At home we have a proxy server. At work we don't. Firefox irritates in this regard: whenever I launch it, it defaults to the proxy server. If I do Tools>Options>Settings and select "No proxy", no problem. However, if I shutdown Firefox and restart it, I have to do the Tools>Options>Settings thing all over again beca...
<p>Use <a href="http://foxyproxy.mozdev.org/" rel="nofollow noreferrer">FoxyProxy</a>, much more flexible to configure</p>
<p>I used a local automatic proxy configuration script for years with great success. The trick was identifying from the URL or IP address where I was.</p> <p>/Allan</p>
9,496
<p>I have an application which extracts data from an XML file using XPath. If a node in that XML source file is missing I want to return the value "N/A" (much like the Oracle NVL function). The trick is that the application doesn't support XSLT; I'd like to do this using XPath and XPath alone.</p> <p>Is that possible?...
<p>It can be done but only if the return value when the node does exist is <em>the string value of the node, not the node itself</em>. The XPath</p> <pre><code>substring(concat("N/A", /foo/baz), 4 * number(boolean(/foo/baz))) </code></pre> <p>will return the string value of the <code>baz</code> element if it exists, ...
<p>It can be done with XPath 1.0. Say you have</p> <pre><code>&lt;foo&gt; &lt;bar/&gt; &lt;/foo&gt; </code></pre> <p>If you want to test if <code>foo</code> has a <code>baz</code> child,</p> <pre><code>substring("N/A", 4 * number(boolean(/foo/baz))) </code></pre> <p>will return "N/A" if the expression <code>/foo/...
6,159
<p>I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose UI requires the use of a ComboBox control. Unfortunately, for devices with neither a hardware fullsize keyboard nor a touchscreen interface, there is no way to move (tab) from the ComboBox control to another control on the s...
<p>I believe directionals are only captured on <code>KeyDown</code> and <code>KeyUp</code>, not on <code>KeyPress</code>.</p> <p>Alternatively to using a ComboBox, you could use several RadioButtons if the numer of ListItems is static and relatively small.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb985500.aspx#GeneralRules" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb985500.aspx#GeneralRules</a> provides UI navigation rules. </p>
7,534
<p>It's really quite annoying as they are not part of the project.</p>
<p>The Visual Studio Web Deployment addin lets you exclude folders and more. <a href="http://msdn.microsoft.com/en-us/asp.net/aa336619.aspx" rel="nofollow noreferrer">VS2005</a> <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&amp;displaylang=en" rel="nofollow nore...
<p>The Visual Studio Web Deployment addin lets you exclude folders and more. <a href="http://msdn.microsoft.com/en-us/asp.net/aa336619.aspx" rel="nofollow noreferrer">VS2005</a> <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&amp;displaylang=en" rel="nofollow nore...
7,308
<p>I have a table with more than a millon rows. This table is used to index <code>tiff</code> images. Each image has fields like <code>date</code>, <code>number</code>, etc. I have users that index these images in batches of 500. I need to know if it is better to first insert 500 rows and then perform 500 updates or, w...
<p>Updates in Sql server result in ghosted rows - i.e. Sql crosses one row out and puts a new one in. The crossed out row is deleted later.</p> <p>Both inserts and updates can cause page-splits in this way, they both effectively 'add' data, it's just that updates flag the old stuff out first.</p> <p>On top of this u...
<p>I'm not a database guy, but I imagine doing the inserts in one shot would be faster because the updates require a lookup whereas the inserts do not.</p>
6,322
<p>I have two separate mercurial repositories. At this point it makes sense that they "become one" because I want to work on the two projects simultaneously.</p> <p>I'd really like the two projects to each be a subdirectory in the new repository.</p> <ol> <li>How do I merge the two projects?</li> <li>Is this a good i...
<p>I was able to combine my two repositories in this way:</p> <ol> <li>Use <code>hg clone first_repository</code> to clone one of the repositories.</li> <li>Use <code>hg pull -f other_repository</code> to pull the code in from the other repository.</li> </ol> <p>The <code>-f</code> (force) flag on the pull is the key...
<p>If you aren't using the same code across the projects, keep them separate. You can set <em>your</em> personal repository of each of those projects to be just a directory apart. Why mix all the branches, merges, and commit comments when you don't have to.</p> <p><strong>About your edit:</strong> Pushing from One rep...
3,391
<p>BuildTak is great because the printed plastic really sticks to it, it pretty much solved all the problems I had with prints detaching from the buildplate during printing.</p> <p>However, it does sometimes cause the opposite problem of prints sticking too much and just not detaching from the build plate.</p> <p>I'm...
<p>I would do as fred_dot_u initially suggested, by increasing the bed temp (or using a hair dryer) to heat the BuildTak. Then, use a small fan to quickly cool the platform (or at least quicker than room temperature). An ice pack on the build plate/part could also work. This drastic fluctuation between the build platfo...
<p>If you have a heated bed, bring the bed up to a reasonable temperature, then do as best as you can to create rapid cooling. If you can remove the bed, heated or not, consider to place it in a freezer or refrigerator. Obviously, if the bed is heated, you'll want to handle the bed carefully and not place it on anythin...
294
<p>I need to create a batch file which starts multiple console applications in a Windows .cmd file. This can be done using the start command.</p> <p>However, the command has a path in it. I also need to pass paramaters which have spaces as well. How to do this?</p> <p>E.g. batch file</p> <pre><code>start "c:\path...
<p>Actually, his example won't work (although at first I thought that it would, too). Based on the help for the Start command, the first parameter is the name of the newly created Command Prompt window, and the second and third should be the path to the application and its parameters, respectively. If you add another "...
<p>Surrounding the path and the argument with spaces inside quotes as in your example should do. The command may need to handle the quotes when the parameters are passed to it, but it usually is not a big deal.</p>
9,828
<p>I want to get my databases under version control.</p> <p>I'll always want to have at least <em>some</em> data in there (as <a href="https://stackoverflow.com/users/80/alumb">alumb</a> mentions: user types and administrators). I'll also often want a large collection of generated test data for performance measurements...
<p>Martin Fowler wrote my favorite article on the subject, <a href="http://martinfowler.com/articles/evodb.html" rel="noreferrer">http://martinfowler.com/articles/evodb.html</a>. I choose not to put schema dumps in under version control as <em>alumb</em> and others suggest because I want an easy way to upgrade my prod...
<p>An alternative to version controlling your database is to use a version-controlled database, of which there are now several.</p> <p><a href="https://www.dolthub.com/blog/2021-09-17-database-version-control/" rel="nofollow noreferrer">https://www.dolthub.com/blog/2021-09-17-database-version-control/</a></p> <p>These ...
2,264
<p>I am a fresh graduate student in 3D metal printing. My undergraduate major is mechanical engineering. Later research will focus on the process of metal 3D printing. I hope that you can recommend some excellent 3D metal printing books for learning.</p>
<p>This is a free ebook that I have perused briefly which it looks interesting, and it is free (did I say that already?)</p> <ul> <li><a href="https://www.mdpi.com/books/pdfview/book/384" rel="nofollow noreferrer">3D Printing of metals</a> <ul> <li>Manoj Gupta</li> <li>ISBN 978-3-03842-591-5 (Pbk); </li> <li>ISBN 978...
<p>Just wanted to add that ultimately you get a lot more quick practical knowledge from your machine's manufacturer or DMLS service provider so don't forget to look at publications from the industry leaders. They have incentive to make sure you succeed when using their products. Just beware the salesmanship.</p> <p>...
1,461
<p>One way to give PLA prints a smooth finish is treatment with chloroform vapours (or other solvents, as mentioned in <a href="https://3dprinting.stackexchange.com/a/36/674">this</a> answer). This method is even featured on <a href="https://ultimaker.com/en/tips-tricks/17897-vapor-treating" rel="nofollow noreferrer">U...
<p><a href="https://www.reddit.com/r/3Dprinting/comments/25ej7d/does_anyone_have_experience_with_pla_thf_vapor/" rel="nofollow noreferrer">This Reddit post</a> seems to have some good trial and error dialog.</p> <p><a href="http://www.thingiverse.com/thing:73120" rel="nofollow noreferrer">This Thingiverse post</a>, al...
<p>Beside vaporizing with heat, you can use an atomizer and do cold vapor. The time is around 1-5 minutes at 45ºC for a 10x10x20&nbsp;mm piece like a Marvin or a bot. I have done only gangster tests with it, so I have no larger piece info.</p> <p>Passive vapor polish does not work with chloroform since it tends to cra...
198
<p>What's the easiest way to profile a PHP script?</p> <p>I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions.</p> <p>I tried experimenting with the <a href="http://php.net/microtime" rel="noreferrer">microtim...
<p>You want <a href="http://www.xdebug.org/" rel="noreferrer">xdebug</a> I think. Install it on the server, turn it on, pump the output through <a href="http://kcachegrind.sourceforge.net/html/Home.html" rel="noreferrer">kcachegrind</a> (for linux) or <a href="http://sourceforge.net/projects/wincachegrind/" rel="norefe...
<p>XDebug is not stable and it's not always available for particular php version. For example on some servers I still run php-5.1.6, -- it's what comes with RedHat RHEL5 (and btw still receives updates for all important issues), and recent XDebug does not even compile with this php. So I ended up with switching to <a h...
4,142
<p>I was just wondering if there is an elegant way to set the maximum CPU load for a particular thread doing intensive calculations. <br/><br/>Right now I have located the most time consuming loop in the thread (it does only compression) and use <code>GetTickCount()</code> and <code>Sleep()</code> with hardcoded values...
<p>I am not aware of any API to do get the OS's scheduler to do what you want (even if your thread is idle-priority, if there are no higher-priority ready threads, yours will run). However, I think you can improvise a fairly elegant throttling function based on what you are already doing. Essentially (I don't have a W...
<p>You may be able to change the priority of a thread, but changing the maximum utilization would either require polling and hacks to limit how many things are occurring, or using OS tools that can set the maximum utilization of a process. However, I don't see any circumstance where you would want to do this.</p>
2,418
<p>It's 2008, and I'm still torn on this one. So I'm developing a web method that needs a complex type passed into it and returned from it. The two options I'm toying with are:</p> <ol> <li><p>Pass and return <em>actual</em> business objects with both data and behavior. When wsdl.exe is run, it will automatically c...
<p>I'd do a hybrid. I would use an object like this</p> <pre><code>public class TransferObject { public string Type { get; set; } public byte[] Data { get; set; } } </code></pre> <p>then i have a nice little utility that serializes an object then compresses it.</p> <pre><code>public static class CompressedSe...
<blockquote> <p><strong>Darren</strong> wrote: I'd do a hybrid. I would use an object like this...</p> </blockquote> <p>Interesting idea... passing a serialized version of the object instead of the (wsdl-ed) object itself. In a way, I like its elegance, but in another way, it seems to defeat the purpose of exposing...
3,404
<p>Word 2007 saves its documents in .docx format which is really a zip file with a bunch of stuff in it including an xml file with the document.</p> <p>I want to be able to take a .docx file and drop it into a folder in my asp.net web app and have the code open the .docx file and render the (xml part of the) document ...
<p>Try this <a href="http://blog.maartenballiauw.be/post/2008/01/11/Preview-Word-files-(docx)-in-HTML-using-ASPNET-OpenXML-and-LINQ-to-XML.aspx" rel="nofollow noreferrer">post</a>? I don't know but might be what you are looking for.</p>
<p>I'm using Interop. It is somewhat problamatic but works fine in most of the case.</p> <pre><code>using System.Runtime.InteropServices; using Microsoft.Office.Interop.Word; </code></pre> <p>This one returns the list of html converted documents' path</p> <pre><code>public List&lt;string&gt; GetHelpDocuments() {...
7,884
<p>This page from Adobe says to add a "wmode" parameter and set its value to "transparent": <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14201" rel="nofollow noreferrer">http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_1420</a></p> <p>This works flawlessly in IE. The background re...
<p>On another note; setting the wmode to transparent has a few kinks. For instance it can break the scrolling (the flash stays in the same place disregarding the scroll) in some older versions of Firefox (pre 2.0). I've also had issues with ALT-key combinations in textfields not working when wmode is transparent.</p> ...
<p>Enabling windowless mode (wmode=) makes embedded flash act and render just like other elements. Without that, it's rendered in a seperate step and just overlaid on the browser's window.</p> <p>Could the flash element be losing focus? Sounds like input focus is moved to the scollbar, then you have to move it back.</...
2,848
<p>Every method I write to encode a string in Java using 3DES can't be decrypted back to the original string. Does anyone have a simple code snippet that can just encode and then decode the string back to the original string?</p> <p>I know I'm making a very silly mistake somewhere in this code. Here's what I've been ...
<p>Your code was fine except for the Base 64 encoding bit (which you mentioned was a test), the reason the output may not have made sense is that you were displaying a raw byte array (doing toString() on a byte array returns its internal Java reference, not the String representation of the <strong>contents</strong>). H...
<pre><code>import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.Key; import javax.crypto.Cipher; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.IvParameterSpec; import java.util.Base64; import java.util.Base64.Encoder; /*...
4,057
<p>I'm trying to draw a graph on an ASP webpage. I'm hoping an API can be helpful, but so far I have not been able to find one. </p> <p>The graph contains labeled nodes and unlabeled directional edges. The ideal output would be something like <a href="http://en.wikipedia.org/wiki/Image:6n-graf.svg" rel="noreferrer">th...
<p>Definitely <a href="http://graphviz.org" rel="nofollow noreferrer">graphviz</a>. The image on the wikipedia link you are pointing at was made in graphviz. From its description page the graph description file looked like this:</p> <pre><code>graph untitled { graph[bgcolor="transparent"]; node [fontname="Bits...
<p>You might be able to pull this off with <a href="http://code.google.com/apis/chart/" rel="nofollow noreferrer">Google's Chart API</a>. It is very easy to get started with.</p>
9,467
<p>I'm just looking for different opinions. Do you consider OpenID a good "Single Sign On" solution?</p> <p>The way it works seems to be a little bit confusing for an average user and there could be problems related to "putting all your eggs in the same basket".</p> <p>Anyway, have anyone tried to implement his own O...
<p>Also, SSO (as you mentioned) usually implies that I only have to login once (presumably to my workstation) and then from there on, I don't need to sign-in anywhere.</p> <p>OpenID of course doesn't solve that problem. For example, if I use OpenID to sign in to StackOverflow, it doesn't mean I don't need to sign in t...
<p>Actually, in the case of StackOverflow, a separate account would have saved me a lot of trouble. I decided to use my WordPress.com OpenID, since that's where I'm hosting my blog, but it turned out that WordPress.com have serious problems with their OpenID service, and most of the time I am not able to log on to Stac...
4,206
<p>Acetone can be used to smooth ABS prints. What safety precautions should be taken during its use?</p>
<p>There are a few main safety precautions you should consider.</p> <ul> <li><strong><a href="http://sinkhacks.com/building-acetone-vapor-bath-smoothing-3d-printed-parts/" rel="nofollow">Make sure the area is well-ventilated.</a></strong> Acetone is flammable. A buildup of acetone gas could quickly get concentrated, m...
<p>You can smooth a print with acetone using different approaches which require different precautions. In general, you should have ventilated area and use gloves (or wash your hands after the procedure). </p> <h2>Applying Acetone Directly</h2> <p>Using the print in acetone for several seconds or you can apply acetone...
105
<p>Is there anyway to have a sort of virtual static member in C++?</p> <p>For example:</p> <pre><code>class BaseClass { public: BaseClass(const string&amp; name) : _name(name) {} string GetName() const { return _name; } virtual void UseClass() = 0; private: const string _name; ...
<p>Here is one solution: </p> <pre><code>struct BaseData { const string my_word; const int my_number; }; class Base { public: Base(const BaseData* apBaseData) { mpBaseData = apBaseData; } const string getMyWord() { return mpBaseData-&gt;my_word; } int getMyNumber() ...
<p>It sounds as if you're trying to avoid having to duplicate the code at the leaf classes, so why not just derive an intermediate base class from the base class. this intermediate class can hold the static data, and have all your leaf classes derive from the intermediate base class. This presupposes that one static pi...
5,476
<p>When an <code>AutoCompleteExtender</code> is displayed in IE6 it seems to ignore z-index and renders below any select controls (like <strong>dropdownlists</strong>) in IE6.</p> <pre><code>&lt;asp:TextBox ID="TextBox1" runat="server" /&gt; &lt;cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" ...
<p>Nothing renders below select controls in IE6. It's one of the many "features" microsoft bestowed upon us when they gifted IE to the world</p> <p>You have to hide them, then re-show them.</p> <p>Observe the <a href="http://code.google.com/p/nucleus-plugins/source/browse/lightbox2/trunk/lightbox2/js/lightbox.js#205"...
<p>Nothing renders below select controls in IE6. It's one of the many "features" microsoft bestowed upon us when they gifted IE to the world</p> <p>You have to hide them, then re-show them.</p> <p>Observe the <a href="http://code.google.com/p/nucleus-plugins/source/browse/lightbox2/trunk/lightbox2/js/lightbox.js#205"...
6,711
<p>I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the correct type (bar) for the typed user control.</p>
<p>What @MattMitchell said is probably the reason you're seeing this error.</p> <p>If you want to know <em>why</em>; it is because when you pass null as the controlData parameter when using RenderUserControl(), the framework will try to pass the view data from the current view context onto the user control instead (se...
<p>What has probably happened is that the object provided when rendering the user control is actually null.</p>
2,744
<p>I want to send email from a Ruby application. Is there a call in the core language to do this or is there a library I should use? What's the best way to do this?</p>
<p>If you don't want to use <a href="http://wiki.rubyonrails.org/rails/pages/ActionMailer" rel="nofollow noreferrer">ActionMailer</a> you can use <a href="http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html" rel="nofollow noreferrer">Net::SMTP</a> (for the actual sending) together with <a href="https://githu...
<p>You might also consider taking a look at the <a href="http://wiki.rubyonrails.org/rails/pages/ActionMailer" rel="nofollow noreferrer">ActionMailer</a> component that ships as part of, but is not dependent on Rails.</p>
8,281
<p>How can I open a cmd window in a specific location without having to navigate all the way to the directory I want?</p>
<p>This might be what you want: </p> <pre><code>cmd /K "cd C:\Windows\" </code></pre> <p>Note that in order to change drive letters, you need to use <code>cd /d</code>. For example:</p> <pre><code>C:\Windows\System32\cmd.exe /K "cd /d H:\Python\" </code></pre> <p><a href="http://ss64.com/nt/cd.html" rel="noreferrer...
<p>For a better experience using a terminal in windows system, <a href="http://cmder.net/" rel="nofollow noreferrer">cmder</a> may help for a shortcut usage:</p> <ol> <li>Download <a href="http://cmder.net/" rel="nofollow noreferrer">cmder</a> into your system</li> <li>Make shortcut</li> <li>type <code>path_of_the_cmd...
8,597
<p>How effective is merging when folders and projects have been renamed in your solution?</p>
<p>We've had lots of success with TFS 2005 when it comes to file deletes/renames, with a few very specific exceptions, namely:</p> <ol> <li>Files which have been renamed in both source and target branches (this is usually trivially solved with a click on "Ignore server changes");</li> <li>Files which have been renamed...
<p>We've had lots of problems with TFS 2005 and deletes in general. I haven't determined the cause yet, but a number of my team members have run into problems merging in changes that involved a renamed or deleted folder. This seems particularly true if there was a lot of refactoring (and renaming, and re-renaming) in...
9,725
<p>I want to use a real IDE for editing javascript files in combination with Firebug. In the 'Add editor' dialog for Firebug I'm allowed to specify executable and arguments. So the question is really how do I open a file in Eclipse/Netbeans from the command line. </p> <p>Extra points for allowing me to choose between ...
<p>Not an exact answer I'm afraid, but this information might help.</p> <p><a href="http://help.eclipse.org/help21/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm" rel="nofollow noreferrer">Eclipse Help - Running Eclipse</a><br> <a href="http://ajaxian.com/archives/fireclipse-debug-from-ff-str...
<p>I havent tried this yet but looks interesting <a href="http://code.google.com/p/jsdt/wiki/newFeatures" rel="nofollow noreferrer">Javascript Debug Toolkit 2.0.0</a></p> <p>Also I have heard that <a href="http://www.aptana.com/" rel="nofollow noreferrer">aptana</a> is pretty good</p>
8,293
<p>I'm working on a system with four logical CPS (two dual-core CPUs if it matters). I'm using make to parallelize twelve trivially parallelizable tasks and doing it from cron.</p> <p>The invocation looks like:</p> <pre><code>make -k -j 4 -l 3.99 -C [dir] [12 targets] </code></pre> <p>The trouble I'm running into i...
<p>I'd drop the '-l'</p> <p>If all you plan to run the the system is this build I <em>think</em> the -j 4 does what you want.</p> <p>Based on my memory, if you have anything else running (crond?), that can push the load average over 4.</p> <p><a href="http://sunsite.ualberta.ca/Documentation/Gnu/make-3.79/html_chapt...
<p>Does make think one of the targets is failing? If so, it will stop the make after the running jobs finish. You can use -k to tell it to continue even if an error occurs.</p>
5,589
<p>I know the minimum layer height will effect how detailed of an item you can print and the amount of time it takes to print something, but is it necessary to have an extremely low minimum layer height if you plan to print only larger objects?</p>
<p>I believe the <a href="http://manual.slic3r.org/first-print/first-layer">Slic3r Manual</a> summarizes this quite nicely:</p> <blockquote> <p>A thicker layer height will provide more flow, and consequently more heat, making the extrusion adhere to the bed more. It also gives the benefit of giving more tolerance fo...
<p>In short: no.</p> <p>Smaller layers will make your prints look nicer. That said, in my experience, most printers can handle roughly the same layer heights, no matter what the manufacturer says it can do. With a little tinkering, you can get any printer to do what you tell it to do.</p> <p>That said, for larger pri...
84
<p>I'm trying to the the flv Flash player <a href="http://www.jeroenwijering.com/?item=JW_FLV_Player" rel="nofollow noreferrer">from here</a> in a windows forms application. I currently have it playing 1 .flv file with no problems but I really need to be able to play multiple files. Has anyone had experienace of using ...
<p>Can you get the control to run the way you want it in a webpage/browser? If yes (and the problem is with winforms, I'd just embed it in a browser control. If no, I'd as the creators directly.</p>
<p>Hmm I ran into this same problem as well. The prob is that loadmovie method doesnt seem to clear the last movie. And so far I haven't found any technique to load a new movie into the same flash player.</p>
6,515
<p>Is there any reason not to use the bitwise operators &amp;, |, and ^ for "bool" values in C++? </p> <p>I sometimes run into situations where I want exactly one of two conditions to be true (XOR), so I just throw the ^ operator into a conditional expression. I also sometimes want all parts of a condition to be evalu...
<p><code>||</code> and <code>&amp;&amp;</code> are boolean operators and the built-in ones are guaranteed to return either <code>true</code> or <code>false</code>. Nothing else.</p> <p><code>|</code>, <code>&amp;</code> and <code>^</code> are bitwise operators. When the domain of numbers you operate on is just 1 and 0...
<p>IIRC, many C++ compilers will warn when attempting to cast the result of a bitwise operation as a bool. You would have to use a type cast to make the compiler happy.</p> <p>Using a bitwise operation in an if expression would serve the same criticism, though perhaps not by the compiler. Any non-zero value is consi...
4,416
<p>I'm having some internationalisation woes:</p> <p>My UTF-8 string fields are being rendered in the browser as ???? after being returned from the database.</p> <p>After retrieval from the database using Hibernate, the String fields are presented correctly on inspection using the eclipse debugger.</p> <p>However St...
<p>You could try something like this.</p> <p>It's taken from sun's page on <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebI18N5.html" rel="nofollow noreferrer">Character Sets and Encodings</a>. I think this has to be the very first line in your jsp.</p> <pre><code>&lt;%@ page contentType="text/html; chars...
<p>Try setting the lang attribute on the &lt;html/&gt; element.</p> <p>HTML example:</p> <pre> &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html lang="ja"&gt; </pre> <p>XHTML example:</p> <pre> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans...
7,991
<p>I have a vb6 form with an ocx control on it. The ocx control has a button on it that I want to press from code. How do I do this?</p> <p>I have:</p> <pre><code>Dim b As CommandButton Set b = ocx.GetButton("btnPrint") SendMessage ocx.hwnd, WM_COMMAND, GetWindowLong(b.hwnd, GWL_ID), b.hwnd </code></pre> <p>but it d...
<p>I believe the following will work:</p> <pre><code>Dim b As CommandButton Set b = ocx.GetButton("btnPrint") b = True </code></pre> <p><code>CommandButton</code>s actually have two functions. One is the usual click button and the other is a toggle button that acts similar to a <code>CheckBox</code>. The default prop...
<p>Do you have access to the OCX code? You shouldn't really be directly invoking the click of a button. You should refactor the code so that the OCX button click code calls a function, e.g.</p> <pre><code>CMyWindow::OnLButtonDown() { this-&gt;FooBar(); } </code></pre> <p>Then from your VB6 app, directly call the Fo...
6,237
<p>I am working with Ender 3 Pro and in menu it has an option to cooldown. Is there any need to cooldown 3D printer before shutdown or can I just shutdown without cooldown? </p>
<p>Depending on what material you print it it most likely a good idea to let the hotend cool down before shutting off the printer (fan). </p> <p>For example if you shut down the printer right after you print a PLA part, at 190 - 220 degrees Celsius, your hot end will still be that hot and will suffer heat creep withou...
<p>That option you are referring to, is meant to manually shut down power to the heated bed and hotend, there is no timed cool down period other than you timing it. This is a handy option if you fiddled with either the bed or the hotend; e.g. to insert new filament.</p> <p>A cool down period can be very useful dependi...
1,356
<p>So I'm making my friend a Monado sword replica and I've printed the handle in 2 pieces as to fill it with electronics and then superglue the 2 halves together.</p> <p>I seem to have put too much on and it's leaked out and spread as shown in the picture..</p> <p>Does anyone know how to get the dried glue off? <a href...
<p>In agreement with what Akriss said, pretty much all &quot;super&quot; glue is CA (cyanoacrylate) glue, which is soluble in acetone. PLA itself is does not dissolve in or react with acetone, but the pigments, additives, etc. likely do, so you should wipe with a paper towel or cloth (the latter might be better to avoi...
<p>I've used Acetone before. However that said I've not had the need to remove it from PLA. Not sure how PLA reacts to Acetone.</p> <p>A link that may be of use. <a href="https://www.art-us.com/how-to-get-super-glue-off-almost-anything/" rel="nofollow noreferrer">https://www.art-us.com/how-to-get-super-glue-off-almost-...
1,799
<p>I find working on the command line in Windows frustrating, primarily because the console window is wretched to use compared to terminal applications on linux and OS X such as "rxvt", "xterm", or "Terminal". Major complaints:</p> <ol> <li><p>No standard copy/paste. You have to turn on "mark" mode and it's only ava...
<p>Sorry for the self-promotion, I'm the author of another Console Emulator, not mentioned here.</p> <p><a href="http://www.fosshub.com/ConEmu.html" rel="nofollow noreferrer">ConEmu</a> is opensource console emulator with tabs, which represents multiple consoles and simple GUI applications as one customizable GUI wind...
<p>Take a look at <a href="http://www.jpsoft.com" rel="nofollow noreferrer">Take Command</a>.</p> <blockquote> <p>Take Command is a comprehensive interactive GUI and command line environment that makes using the Windows command prompt and creating batch files easy and far more powerful.</p> </blockquote> <p>(Take C...
8,606
<p>Within an application, I've got Secret Keys uses to calculate a hash for an API call. In a .NET application it's fairly easy to use a program like Reflector to pull out information from the assembly to include these keys.</p> <p>Is obfuscating the assembly a good way of securing these keys?</p>
<p>Probably not.</p> <p>Look into cryptography and Windows' built-in information-hiding mechanisms (DPAPI and storing the keys in an ACL-restricted registry key, for example). That's as good as you're going to get for security you need to keep on the same system as your application.</p> <p>If you are looking for a wa...
<p>I wouldn't think so, as obfuscating (as I understand it at least) will simply mess around with the method names to make it hard (but not impossible) to understand the code. This won't change the data of the actual key (which I'm guessing you have stored in a constant somewhere). </p> <p>If you just want to make it...
5,333
<p>I work on communication devices for people with disabilities that prevent them from speaking. This can be anything from a board with symbols on, to a relatively sophisticated app. </p> <p>Some potential users also have sight issues and have to distinguish symbols by feel (these particular users have cognitive dis...
<p>If you install inkscape, pstoedit and ghostscript version 9.21 (not the latest as pstoedit is incompatible) you can get the file into a format that openscad can import using two commands in a cmd file </p> <pre><code>"C:\Program Files\Inkscape\inkscape" -E "traffic lights.eps" "traffic lights.svg" "C:\Program Fi...
<p>Nothing thats works via scripting BUT is really simple and easy.</p> <ol> <li>register on tinkercad.com (I know register is a bummer but its a great tool)</li> <li>open a new design</li> <li>import *.svg file</li> <li>adjust height or size of the converted object</li> <li>download .stl</li> </ol> <p>Thats going to...
759
<p>So, I have 2 database instances, one is for development in general, another was copied from development for unit tests.</p> <p>Something changed in the development database that I can't figure out, and I don't know how to see what is different.</p> <p>When I try to delete from a particular table, with for example:...
<p>Hmm, applying the great oracle to this question, I came up with:</p> <p><a href="http://bytes.com/forum/thread830774.html" rel="nofollow noreferrer">http://bytes.com/forum/thread830774.html</a></p> <p>It seems to suggest that another table has a foreign key pointing at the problematic one, when that FK on the othe...
<p>You might have an open transaction on the dev db...that gets me sometimes on SQL Server</p>
7,634
<p>I've been trying to implement unit testing and currently have some code that does the following:</p> <ol> <li>query external database, loading into a feed table </li> <li>query a view, which is a delta of my feed and data tables, updating data table to match feed table</li> </ol> <p>my unit testing strategy is thi...
<p>Is it your intent to test the view which generates the deltas, or to test that your code correctly adds, deletes and updates in response to the view?</p> <p>If you want to test the view, you could use a tool like <a href="http://dbunit.sourceforge.net/" rel="noreferrer">DBUnit</a> to populate your feed and data tab...
<p>I use DbUnit, but also I work very hard to not to have to test against the DB. Tests that go against the database should only exist for the purpose of testing the database interface. So I have Mock Db Connections that I can set the data for use in all the rest of my tests.</p>
6,980
<p>I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation?</p>
<p>I usually have</p> <pre> Project Directory src - actual source doc - documentation lib - libraries referenced from source dep - installation files for dependencies that don't fit in lib db - database installation script </pre> <p>In work with Visual Studio, I'm not sure if this works the same in the jav...
<p>I use Eclipse for creating J2EE web applications and this will create the following project structure:</p> <pre><code>WebAppName\ \lib \src \tests etc... </code></pre> <p>I would then create an SVN folder on our trunk called WebAppNameProject. Within this folder I would create folders called WebApp...
6,284
<p>How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.</p> <p>I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it.</p>
<p>Here's my suggestion:</p> <pre><code> [Flags] public enum ThreadAccess : int { TERMINATE = (0x0001), SUSPEND_RESUME = (0x0002), GET_CONTEXT = (0x0008), SET_CONTEXT = (0x0010), SET_INFORMATION = (0x0020), QUERY_INFORMATION = (0x0040), SET_THREAD_TOKEN = (0x0080), ...
<p>See this CodeProject article for the win32 basics : <a href="http://www.codeproject.com/KB/threads/pausep.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/threads/pausep.aspx</a>. This sample code makes use of the ToolHelp32 library from the SDK, so I would recommend turning this sample code into an un...
9,674