instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain.</p> <p>I'm creating a procedure that is going to take a list of keywords to be searched for in a column that contains text. If I was sitting at the console, I...
<p>Your first query will work but will require a full table scan because any index on that column will be ignored. You will also have to do some dynamic SQL to generate all your LIKE clauses.</p> <p>Try a full text search if your using SQL Server or check out one of the <a href="http://lucene.apache.org/java/docs/in...
<p>Performance will be depend on the actual server than you use, and on the schema of the data, and the amount of data. With current versions of MS SQL Server, that query should run just fine (MS SQL Server 7.0 had issues with that syntax, but <a href="http://support.microsoft.com/kb/225093" rel="nofollow noreferrer">...
4,085
<p>Is there any alternative image manipulation library for .net? I would prefer something that is managed and open source. </p> <p>I ask this because of two reasons:</p> <ol> <li>I have encountered hard to debug GDI+ errors with System.Drawing in the past</li> <li>I have read that using System.Drawing in asp.net web...
<p>I don't know of any fully-managed 2D drawing libraries that are either free or open-source (there appears to be a few commercially available, but OSS is the way to go). However, you might look into <a href="http://www.go-mono.com/docs/index.aspx?tlink=0@N:Cairo" rel="nofollow noreferrer">the Mono bindings to Cairo<...
<p>With respect to (1), most of the hard to debug errors are due to not closing open handles (Dispose() in managed-land). I'm curious where you heard (2).</p>
3,426
<p><strong>Problem:</strong> </p> <p>I have two spreadsheets that each serve different purposes but contain one particular piece of data that needs to be the same in both spreadsheets. This piece of data (one of the columns) gets updated in spreadsheet A but needs to also be updated in spreadsheet B.</p> <p><strong>...
<p>So you mean that AD743 on spreadsheet B must be equal to AD743 on spreadsheet A? Try this:</p> <ul> <li>Open both spreadsheets on the same machine.</li> <li>Go to AD743 on spreadsheet B.</li> <li>Type =.</li> <li>Go to spreadsheed A and click on AD743.</li> <li>Press enter.</li> </ul> <p>You'll notice that the fo...
<p>I can't say if this is overkill without knowing the details of your usage case, but consider creating a spreadsheet C to hold all data held in common between the two. Links can become dizzyingly complex as spreadsheets age, and having a shared data source might help clear up the confusion.</p> <p>Perhaps even more...
2,518
<p>I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I'd like the exception handler to be able to prompt the user to click a <kbd>Send Error Report</kbd> button, which would then cause the app to send an email to my FogBug...
<p>You'll want to use the SmtpClient class as outlined <strong><a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx" rel="nofollow noreferrer">here</a></strong>.<br> There are no gotchas - sending email is about as easy as it gets.</p>
<blockquote> <p>You'll want to use the SmtpClient class as outlined <a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx" rel="nofollow noreferrer">here</a>. There are no gotchas - sending email is about as easy as it gets.</p> </blockquote> <p>An extensive <a href="http://www.systemnet...
8,237
<p>I'm new to 3D printing and have bought an Ender 3. I have printed a few good prints but I'm noticing a worsening issue: </p> <p>When I select "autohome" the axes head towards their limit switches, but the y axis in particular seems to slam into the limit switch, bending it away, meaning that the platform bounces of...
<p>Personally, I have found that if you bend the arm of the limit switch out, it gets triggered earlier and solves this issue for good, (broke a switch clean off at the bend on the pins, soldered old switch back onto the pins in the board) bent the arm to a greater angle, so the striker triggers 3-5&nbsp;mm earlier, pr...
<p>The solution seems to be simply triggering the switch earlier, and making sure that it is triggered. The thin arm can end up bent over the actual button of the switch, meaning that the arm can be touching the switch without actually &quot;pressing&quot; the switch. For some, bending the arm seems to have worked, but...
1,620
<p>I am attempting to print a model that is too tall to print up-right and it has a large flat side that would be my first layer but ultimately would be the side of the object and I'd like it to look presentable. I'm using wood PLA, so I intend to sand and stain it.</p> <p>I've had no issues with adhesion when using a...
<p>The motor is mounted in a fixed position no matter if it's on top or bottom. You can imagine the lead screw as a rod hanging down and supporting the bed in the Z direction only, because all of the XY rigidity comes from the Liner rails the bed is attached to it works just as well if the stiff rod is under compressio...
<p>The motor is mounted in a fixed position no matter if it's on top or bottom. You can imagine the lead screw as a rod hanging down and supporting the bed in the Z direction only, because all of the XY rigidity comes from the Liner rails the bed is attached to it works just as well if the stiff rod is under compressio...
2,019
<p><strong>When using the Entity Framework, does ESQL perform better than Linq to Entities?</strong> </p> <p>I'd prefer to use Linq to Entities (mainly because of the strong-type checking), but some of my other team members are citing performance as a reason to use ESQL. I would like to get a full idea of the pro's/co...
<p>The most obvious differences are:</p> <p>Linq to Entities is strongly typed code including nice query comprehension syntax. The fact that the “from” comes before the “select” allows IntelliSense to help you.</p> <p>Entity SQL uses traditional string based queries with a more familiar SQL like syntax where the SELE...
<p>For direct queries I'm using linq to entities, for dynamic queries I'm using ESQL. Maybe the answer isn't either/or, but and/also.</p>
5,957
<p>Theres is a little problem I want to solve with Haskell: let substitute a function that change all of the wildcards in a string for one concrete parameter. The function has de signature of:</p> <pre><code>subs :: String -&gt; String -&gt; String -&gt; String -- example: -- subs 'x' "x^3 + x + sin(x)" "6.2" will gen...
<p>You could use the <a href="http://hackage.haskell.org/package/regex-compat-0.95.1" rel="nofollow noreferrer">Text.Regex</a> package.</p> <p>Your example might look something like this:</p> <pre><code>import Text.Regex(mkRegex, subRegex) subs :: String -&gt; String -&gt; String -&gt; String subs wildcard input val...
<p>Use regular expressions (<code>Text.Regex.Posix</code>) and search-replace for <code>/\Wx\W/</code> (Perl notation). Simply replacing <code>x</code> to <code>6.2</code> will bring you trouble with <code>x + quux</code>.</p> <p><a href="http://lukeplant.me.uk/blog.php?id=1107301690" rel="nofollow noreferrer">Haskel...
9,029
<p>When you are doing integration tests with either just your data access layer or the majority of the application stack. What is the best way prevent multiple tests from clashing with each other if they are run on the same database?</p>
<p>Transactions.</p> <p>What the ruby on rails unit test framework does is this:</p> <pre><code>Load all fixture data. For each test: BEGIN TRANSACTION # Yield control to user code ROLLBACK TRANSACTION End for each </code></pre> <p>This means that</p> <ol> <li>Any changes your test makes to the databas...
<p>I wanted to accept both Free Wildebeest's and Orion Edwards' answers but it would not let me. The reason I wanted to do this is that I'd come to the conclusion that these were the two main ways to do it, but which one to chose depends on the individual case (mostly the size of the database).</p>
8,700
<p>First off I understand that it is a horrible idea to run extremely large/long running reports. I am aware that Microsoft has a rule of thumb stating that a SSRS report should take no longer than 30 seconds to execute. However sometimes gargantuan reports are a preferred evil due to external forces such complying wi...
<blockquote> <ol> <li>Does anyone know of anyway to reduce/optimize the PDF export phase and or the size of the PDF without lowering the total page count?</li> </ol> </blockquote> <p>I have a few ideas and questions:<br> 1. Is this a graphics-heavy report? If not, do you have tables that start out as text...
<blockquote> <ol> <li>Does anyone know of anyway to reduce/optimize the PDF export phase and or the size of the PDF without lowering the total page count?</li> </ol> </blockquote> <p>I have a few ideas and questions:<br> 1. Is this a graphics-heavy report? If not, do you have tables that start out as text...
3,612
<p>I play a <a href="https://en.m.wikipedia.org/wiki/Berimbau" rel="noreferrer">berimbau</a> for Capoeira. One of the most fragile (and most expensive) bits is the <em>cabaça</em>, a hollow gourd used as a resonator.</p> <p><img src="https://i.stack.imgur.com/tRNcL.jpg" alt="cabaças"></p> <p>I'm not very familiar wit...
<p>I can't answer this from a technical 3D printing angle. But, from a musical angle:</p> <p>Where the body of an instrument has the primary function of enclosing a vibrating air column, the material has often been demonstrated to perhaps make a difference, but only a subtle one. As an example, a recent range of pla...
<p>I'll take a stab here, but my gut instinct is to say that a printed part will not sound the same as your original gourd resonator.</p> <p>I believe the acoustics rely on the hardness, shape, and size of the material. In which case, a gourd is a hard and often thin material (after gutting it). Typical 3D printing ma...
661
<p>I'm basically trying to figure out the simplest way to perform your basic insert operation in C#.NET using the SqlClient namespace. </p> <p>I'm using <code>SqlConnection</code> for my db link, I've already had success executing some reads, and I want to know the simplest way to insert data. I'm finding what seem to...
<pre><code>using (var conn = new SqlConnection(yourConnectionString)) { var cmd = new SqlCommand("insert into Foo values (@bar)", conn); cmd.Parameters.AddWithValue("@bar", 17); conn.Open(); cmd.ExecuteNonQuery(); } </code></pre>
<pre><code>using (SqlConnection myConnection new SqlConnection("Your connection string")) { SqlCommand myCommand = new SqlCommand("INSERT INTO ... VALUES ...", myConnection); myConnection.Open(); myCommand.ExecuteNonQuery(); } </code></pre>
5,192
<p>Has anyone looked at <a href="http://developer.yahoo.com/flash/" rel="nofollow noreferrer">Yahoo's ASTRA</a>? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the <c...
<p>Okay... so no-one's tried Astra, or people just avoid Flash questions.</p> <p>After a lot of guess work it turns out I needed to cast the series to a PieSeries and then work with those member functions, as the ISeries was useless on it's own.</p> <pre><code>myPieChart.dataTipFunction = function (item:Object, in...
<p>The Astra components are distributed with the complete source code. Flash CS3 components use compiled shims because otherwise you'd need to manually add the raw source files to your classpath. As a bonus, they also improve compile times because they're already built for you. Look in the "Source" folder in the Astra ...
5,367
<p>I want to be able to generate PDF output from my (native) C++ Windows application. Are there any free/open source libraries available to do this?</p> <p>I looked at the answers to <a href="https://stackoverflow.com/questions/177/how-do-i-programmatically-create-a-pdf-in-my-net-application">this question</a>, but th...
<p><a href="https://github.com/libharu/libharu" rel="noreferrer">LibHaru</a></p> <blockquote> <p>Haru is a free, cross platform, open-sourced software library for generating PDF written in ANSI-C. It can work as both a static-library (.a, .lib) and a shared-library (.so, .dll).</p> </blockquote> <p>Didn't...
<p><a href="http://wxcode.sourceforge.net/docs/wxpdfdoc/" rel="nofollow">http://wxcode.sourceforge.net/docs/wxpdfdoc/</a></p> <p>Works with the wxWidgets library.</p>
8,315
<p>I want to write a tool that helps me search pdf/chm/djvu files in linux. Any pointers on how to go about it? </p> <p>The major problem is reading/importing data from all these files. Can this be done with C and shell scripting? </p>
<p><a href="https://wiki.ubuntu.com/Tracker" rel="nofollow noreferrer">Tracker</a> ships with Ubuntu 8.04 -- it was a significant switch from Beagle which users believed was too resource (CPU) intensive and didn't yield good enough results. It indexes both pdf and chm and according to <a href="http://bugs.debian.org/cg...
<p>How about a plugin for <a href="http://www.beagle-project.org/" rel="nofollow noreferrer">Beagle</a> ?</p> <p>It already searches PDFs but you can add other file types.</p> <p>Here is the relevant wikipedia page : <a href="http://en.wikipedia.org/wiki/Beagle_(software)" rel="nofollow noreferrer">http://en.wikipedi...
5,628
<p>Part of the web application I'm working on is an area displaying messages from management to 1...n users. I have a DataAccess project that contains the LINQ to SQL classes, and a website project that is the UI. My database looks like this:</p> <p>User -> MessageDetail &lt;- Message &lt;- MessageCategory</p> <p>Mes...
<p>All your LINQ querys should be in a <strong>business logic class</strong>, no change from older methodologies like ADO.</p> <p>If you are a <strong>purist</strong> you should always return List(of T) from your methods in the business class, in fact, the datacontext should only be visible to the business classes. Th...
<p>Regardless of LINQ, I think that mixing presentation code with database-relaed code is not a good idea. I would create a simple DB abstraction layer on top of LINQ queries. In my opinion LINQ is just a convenient tool, that doesn't have a serious impact on traditional application design.</p>
6,959
<p>Is there a way to view more than the last 300 lines in the terminal tab on OctoPrint? Or is there a txt file of a log? Or even a setting/plugin that does either?</p> <p>I keep finding my prints pausing as if I said to change the filament even though that wasn't set in the slicer, but I catch it long after the 300<s...
<p><strong>Yes</strong>, you can show more than 300 lines in the terminal; just <a href="https://github.com/foosel/OctoPrint/commit/e9623fdc36c658a5b8abe7769b1b308edfc3f424" rel="nofollow noreferrer">disable auto scrolling</a> (<a href="https://github.com/foosel/OctoPrint/issues/286#issuecomment-99215149" rel="nofollow...
<p><strong>Yes</strong>, you can show more than 300 lines in the terminal; just <a href="https://github.com/foosel/OctoPrint/commit/e9623fdc36c658a5b8abe7769b1b308edfc3f424" rel="nofollow noreferrer">disable auto scrolling</a> (<a href="https://github.com/foosel/OctoPrint/issues/286#issuecomment-99215149" rel="nofollow...
1,193
<p><a href="https://i.stack.imgur.com/Fpc5P.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Fpc5P.jpg" alt="enter image description here"></a></p> <p>By what process does the Prusa i3 determine it's home position? </p> <p>I have a feeling that it works like this, but I'm not entirely sure about it:</p> <o...
<p>It works like you describe, but it does not move all axes at the same time. It first moves the X-axis, subtracting steps while the X endstop is not pressed. When the X-axis is is homed (the X-endstop is gets pressed) it repeats the procedure for the Y-axis and finally the Z-axis.</p>
<p>You have the endstop which sends a on or off to the controller board.</p> <p>The boards firmware knows if it is a close or open switch.</p> <p>Lets assume pressed is on and unpressed is off.</p> <p>When the axis is at home it will read as ON. The firmware then will not allow the axis to move in the direction you ...
355
<p>I have a problem with some zombie-like processes on a certain server that need to be killed every now and then. How can I best identify the ones that have run for longer than an hour or so?</p>
<p>If they just need to be killed:</p> <pre><code>if [[ "$(uname)" = "Linux" ]];then killall --older-than 1h someprocessname;fi </code></pre> <p>If you want to see what it's matching</p> <pre><code>if [[ "$(uname)" = "Linux" ]];then killall -i --older-than 1h someprocessname;fi </code></pre> <p>The <code>-i</code> ...
<p>Using ps is the right way. I've already done something similar before but don't have the source handy. Generally - ps has an option to tell it which fields to show and by which to sort. You can sort the output by running time, grep the process you want and then kill it.</p> <p>HTH</p>
2,795
<p>I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. This is helpful in databinding situatio...
<p>Using the LINQ ColumnAttribute to Get Field Lengths from your Database :</p> <p><a href="http://www.codeproject.com/KB/cs/LinqColumnAttributeTricks.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/LinqColumnAttributeTricks.aspx</a></p>
<p>If you need to know the exact column length you can resort to the System.Data classes themselves. Something a bit like this:</p> <pre><code>var context = new DataContextFromSomewhere(); var connection = context.Connection; var command = connection.CreateCommand( "SELECT TOP 1 * FROM TableImInterestedIn" ); var read...
4,101
<p>varchar(255), varchar(256), nvarchar(255), nvarchar(256), nvarchar(max), etc?</p> <p>256 seems like a nice, round, space-efficient number. But I've seen 255 used a lot. Why?</p> <p>What's the difference between varchar and nvarchar?</p>
<p>VARCHAR(255). It won't use all 255 characters of storage, just the storage you need. It's 255 and not 256 because then you have space for 255 plus the null-terminator (or size byte).</p> <p>The "N" is for Unicode. Use if you expect non-ASCII characters.</p>
<p>If you will be supporting languages other than English, you will want to use nvarchar.</p> <p>HTML should be okay as long as it contains standard ASCII characters. I've used nvarchar mainly in databases that were multi-lingual support. </p>
7,812
<p>An app I'm writing always crashes on a clients computer, but I don't get an exception description, or a stack trace.<br> The only thing I get is a crash report that windows wants to send to Microsoft.<br> I would like to get that dump file and investigate it myself, but I cannot find it.</p> <p>When I "View the con...
<p>You can use the <a href="http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx" rel="noreferrer">Windows debugging tools</a> to view the crash dump. To get the most use out of it, you'll need an exact copy of the symbols for that application (i.e. same version).</p> <p>Have a look at <a href="http://blogs.m...
<p>Tess' blog was a great resource. Eventually I managed to figure out how to do remote debugging which means I didn't have to look at the crash dump.</p> <p>For the general community, here are some links I found useful:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/8x6by8d2.aspx" rel="noreferrer">Rem...
4,739
<p>After upgrading a rails 1.2 website to 2.1, the <a href="http://agilewebdevelopment.com/plugins/exception_notifier" rel="noreferrer">ExceptionNotifier plugin</a> no longer works, complaining about this error:</p> <blockquote> <p>ActionView::TemplateFinder::InvalidViewPath: Unprocessed view path found: "/path...
<p>This was caused by a change in rails 2.1 which prevents rails from loading views from any arbitrary path for security reasons.</p> <p>There is now an updated version of the plugin on github, so the solution is to use that.</p> <hr> <p>The old solution here for posterity</p> <p>To work around it, edit <code>init....
<p>You ought to upgrade to the newest Exception Notification plugin which is in <a href="http://github.com/rails/exception_notification/tree/master" rel="nofollow noreferrer">its new home at GitHub</a>.</p>
2,342
<p>I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls.</p> <p>I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which...
<p>It would depend on how the custom controls are being used - A commercial, re-distributable control should be compliant with the VS IDE, and behave the way users expect it to when they implement the control.</p> <p>On the other hand there is no point in wasting a lot of time to get styling to work if you or your tea...
<p>I think you should consider your "target market" for the custom control, e.g., the people who will use it.</p> <p>If it's an internal custom control, you can pretty much mandate the use of one or the other: if it's internal to the company you will have the ability to enforce its consistency.</p> <p>If it's meant f...
9,571
<p>I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary.</p> <p>I know I've done this before, but can't seem to remember how. Thanks for your help.</p> <p>I've manually driven a...
<p>In the properties window change the "behavior" to Dynamic.</p> <p>See: <a href="http://www.codeproject.com/KB/XML/wsdldynamicurl.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/XML/wsdldynamicurl.aspx</a></p>
<p>If you mean a VS2005 "Web Reference", then the generated proxy classes have a URL property that is the SOAP endpoint url of that service. You can change this property and have your subsequent http communications be made to that new endpoint.</p> <p>Edit: Ah, thanks bcaff86. I didn't know you could do that simply...
2,716
<p>Which Database table Schema is more efficient and why?</p> <pre><code>"Users (UserID, UserName, CompamyId)" "Companies (CompamyId, CompanyName)" </code></pre> <p>OR</p> <pre><code>"Users (UserID, UserName)" "Companies (CompamyId, CompanyName)" "UserCompanies (UserID, CompamyId)" </code></pre> <p>Given the fact t...
<p>For sure, the earlier one is more efficient given that constraint. For getting the same information, you will have less number of joins in your queries.</p>
<p>I think you mean "many to one" when it comes to users and companies - unless you plan on having a unique company for each user.</p> <p>To answer your question, go with the first approach. One less table to store reduces space and will make your queries use less JOIN commands. Also, and more importantly, it correctl...
5,976
<p>I have built a 3D printer out of parts from my tip, a ramps board, arduino mega, and a hot end. However, after doing a test extrusion some plastic was spewed out and then the print jammed un-expectantly and my homemade extruder no longer had the strength to push the filament. </p> <p>I took the filament out and wha...
<p>You are suffering from what is called "heat creep". Molten filament is creeping up the heat break and into the bowden tube, where it is causing a jam. You need to install a proper radiator block that is cooled by a fan, not just a lump of wood as a "cold end". The cold end is not just a connector, its primary purpos...
<p>Hello it's seems that your hotend's barrel get's too hot when your ar printing, have you try to make a heat sink on the barrell, with some washers and nuts? That worked for me, like this<a href="https://i.stack.imgur.com/bmfpm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bmfpm.png" alt="enter i...
733
<p>Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of ...
<p>The <a href="http://us2.php.net/gmp" rel="nofollow noreferrer">PHP GMP extension</a> will be better for this. As an added bonus, you can use it to do your decimal-to-binary conversion, like so:</p> <pre><code>gmp_strval(gmp_init($n, 10), 2); </code></pre>
<p>I implemented the following <a href="https://github.com/alixaxel/phunction/blob/ac2bc87e0d6d6c944a46d9714ca79004b18319c0/phunction/Math.php#L74-L143" rel="nofollow">PEMDAS complaint BC evaluator</a> which may be useful to you.</p> <pre><code>function BC($string, $precision = 32) { if (extension_loaded('bcmath')...
5,807
<p>Currently, I'm using a Creality printer to print PLA (that's what I have on hand) but I'm definitely interested in working with other materials that require higher temperatures (both much higher, and just enough higher that the stock hotend is very marginal) in the future. </p> <p>I understand that all-metal hotend...
<blockquote> <p>All-metal hotends are less forgiving </p> </blockquote> <p>Yes </p> <blockquote> <p>not as good for PLA</p> </blockquote> <p>No</p> <blockquote> <p>but how bad?</p> </blockquote> <p>That is very subjective and totally depending on the skill of the 3D printer operator! So, that part of the que...
<blockquote> <p>Are they so bad I should plan on changing back to a PTFE hot end?</p> </blockquote> <p>No, all metal hot end are not that bad, and may even be beneficial when printing at higher temperatures. You mentioned that you want to print ABS and other such materials. At temperatures this high, my understandin...
1,668
<p>I am implementing exception handling for our BizTalk services, and have run into a fairly major stumbling block.</p> <p>In order to make the exception processing as generic as possible, and therefore to allow us to use it for any BizTalk application, our XML error schema includes an xs:any node, into which we can p...
<p>Does your xs:any element have a minOccurs > 0?</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb251017.aspx#UnsupportedConstructs" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb251017.aspx#UnsupportedConstructs</a></p> <p>I've also read that due to the way that InfoPath works, it can...
<p>Does your xs:any element have a minOccurs > 0?</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb251017.aspx#UnsupportedConstructs" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb251017.aspx#UnsupportedConstructs</a></p> <p>I've also read that due to the way that InfoPath works, it can...
5,834
<p>What I mean by autolinking is the process by which wiki links inlined in page content are generated into either a hyperlink to the page (if it does exist) or a create link (if the page doesn't exist).</p> <p>With the parser I am using, this is a two step process - first, the page content is parsed and all of the li...
<p>In my own wiki I check all the links (without caching), but my wiki is only used by a few people internally. You should benchmark stuff like this.</p>
<p>My idea would be to query the titles like <code>SELECT title FROM articles</code> and simply check if each wikilink is in that array of strings. If it is you link to the page, if not, you link to the create page.</p>
3,536
<p>I was wondering if anyone could give me tips for designing a 3d printable structure that can "pinch" down onto a hockey puck shaped piece and hold it tightly. </p> <p>I'd like for the structure to normally want to "pinch" two edges together, but I can pry/force them open when I shove the hockey puck into it. Once I...
<p>Here are first 3 the most simplified and generalized options you have:</p> <p><a href="https://i.stack.imgur.com/XmHnf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XmHnf.png" alt="enter image description here"></a></p> <p>All you need now is to give use more details about your needs. If you r...
<p>If you are looking for a solid piece, the red one darth pixel showed is the best. An important consideration for something like this is making sure that it is able to flex outwards around the puck without fracturing. In order to keep the stress low in the arms, you can reduce the stiffness by either:</p> <ul> <li>I...
376
<p>I intend to use <strong>RADIX / MTRIE</strong> as my preferred data-structure for a routing implementation. </p> <p>Is there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself?</p>
<p>There is a radix-tree implementation available under the GNU General Public License version 2, or (at your option) any later version: </p> <p><a href="http://www.gelato.unsw.edu.au/lxr/source/lib/radix-tree.c" rel="nofollow noreferrer">http://www.gelato.unsw.edu.au/lxr/source/lib/radix-tree.c</a></p>
<p>If you cant find anything else, you can always port this <a href="http://code.google.com/p/radixtree/" rel="nofollow noreferrer"><strong>java version from Google Code</strong>.</a> </p>
9,619
<p>When you print from Google Docs (using the "print" link, not File/Print) you end up printing a nicely formated PDF file instead of relying on the print engine of the browser. Same is true for some of the reports in Google Analytics . . . the printed reports as PDF's are beautiful. How do they do that? I can't ima...
<p>If you are specifically looking at how Google does it. If you look at the <a href="http://docs.google.com/Doc?id=dd8xj6nh_2q9zprkd6" rel="noreferrer" title="I&#39;ve embedded the image in a document here">PDF Properties</a> page, they use Prince 6.0 (see <a href="http://www.princexml.com/" rel="noreferrer">princexml...
<p>Rendering a PDF is hard, complex problem. However generating them, is not. Simply make up some entities, and generate. It's about same problem domain as generating HTML for webpage vs. displaying (rendering) it.</p>
6,998
<p>Is there any way, in any language, to hook my program when a user renames a file?</p> <p>For example: A user renames a file and presses enter (or clicks away) to confirm the rename action. BEFORE the file is actually renamed, my program "listens" to this event and pops up a message saying "Are you sure you want to ...
<p>You can probably solve this by using the <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx" rel="noreferrer">FileSystemWatcher class</a> in .NET framework.</p> <p>From the class remarks:</p> <blockquote> <p>You can watch for renaming, deletion, or creation of files or directorie...
<p>My guess is that this is <em>not</em> possible, I did find <a href="http://msdn.microsoft.com/en-us/library/bb776794(VS.85).aspx" rel="nofollow noreferrer">this</a> which is for monitoring operations (including rename) on a folder, but there does not appear to be a similar method for files.</p> <p>@Richard, FileSys...
4,430
<p>I re-read my question and realized I made a confusing one, so I am rewording a LOT.</p> <p>So the software I use is Craftware. When it comes to the first layer I have it set to .25mm, with the following layers being whatever I specify otherwise. And because of this there shouldn't be a difference with the first lay...
<p>You likely need to re-calibrate the Z-height of your nozzle. The reason that a lot less plastic is coming out of the nozzle at 0.1mm is that the actual gap is likely smaller than 0.1mm. This makes the print bed act essentially like a partial "lid" on the nozzle which occludes the outflow of molten plastic. </p> <p>...
<p>You have asked several questions here. </p> <p>"why is first layer set to 0.25" -- check the gcode file, opening it in a text editor, to see what layer values are specified. </p> <p>"looks like under-extrude" -- please show a picture. If it's purely that the print failing to adhere, you may need to adjust the Z...
852
<p>I'm looking to hear others experiences with SVG + Javascript Frameworks. </p> <p>Things that I'd like the framework to handle - DOM creation, event handling and minimal size.</p> <p>Jquery SVG plugin - <a href="http://keith-wood.name/svg.html" rel="noreferrer">http://keith-wood.name/svg.html</a> seems to be the on...
<p><a href="http://dmitrybaranovskiy.github.io/raphael/" rel="nofollow noreferrer">Raphael</a> is a javascript framework for manipulating vector graphics, either with SVG or VML, depending on what the browser supports.</p>
<p>I haven't used it yet, but i bookmarked <a href="http://www.liquidx.net/plotkit/" rel="nofollow noreferrer">PlotKit</a> some time ago because it's a javascript framework that generates svg</p>
8,861
<p>I have recently started printing with Polymaker's PolyMax PETG on my Ender 3 v2. I have not been able to get the layer adhesion anywhere near as strong as it should be. I would guess it is around 20-25 % of the strength in the XY direction. The parts snap easily along the layer lines under loads that PLA and nylon h...
<p>I had this problem with my Ender 3 until I changed to a different extruder and now PETG never has adhesion problems. Even 100 % fan is fine at 245 °C. I think the stock hobbed gear just slips on PETG really badly, giving underextrusion. Go slow, increase the flow to compensate, and possibly increase temperature slig...
<p>The layer adhesion with Polymax PETG at 260 °C was great so I didn't go any higher.</p>
1,961
<p>The only <em>nice</em> way I've found is:</p> <pre><code>import sys import os try: os.kill(int(sys.argv[1]), 0) print "Running" except: print "Not running" </code></pre> <p>(<a href="http://www.unix.com/unix-advanced-expert-users/79267-trick-bash-scripters-check-if-process-running.html" re...
<p>Mark's answer is the way to go, after all, that's why the /proc file system is there. For something a little more copy/pasteable:</p> <pre><code> &gt;&gt;&gt; import os.path &gt;&gt;&gt; os.path.exists("/proc/0") False &gt;&gt;&gt; os.path.exists("/proc/12") True </code></pre>
<p>Sligtly modified version of ShaChris23 script. Checks if proc_name value is found within process args string (for example Python script executed with python ):</p> <pre><code>def process_exists(proc_name): ps = subprocess.Popen("ps ax -o pid= -o args= ", shell=True, stdout=subprocess.PIPE) ps_pid = ps.pid ...
5,898
<p>Is anyone working on or know if there exists a SQL 2k8 Dialect for NHibernate? </p>
<p>I am assuming the plugin here is the NPAPI plugin (e.g. Flash). Under X11, QtWebKit search several common directories for the plugin. For the complete list, see <a href="http://doc.qt.digia.com/4.5/qtwebkit.html#netscape-plugin-support" rel="nofollow noreferrer">the documentation on Netscape plugin support</a>.</p> ...
<p>Have you tried putting in the <em>standard library directories</em>? It should be picked up by the <strong>linker</strong> if it's in one of those directories.</p> <p>For example:</p> <pre><code>/lib/ /usr/lib/ /usr/share/lib/ /usr/local/lib/ </code></pre>
3,940
<p>I have a piece of server-ish software written in Java to run on Windows and OS X. (It is not running on a server, but just a normal user's PC - something like a torrent client.) I would like the software to signal to the OS to keep the machine awake (prevent it from going into sleep mode) while it is active.</p> <p...
<p>I use this code to keep my workstation from locking. It's currently only set to move the mouse once every minute, you could easily adjust it though.</p> <p>It's a hack, not an elegant solution.</p> <pre><code>import java.awt.*; import java.util.*; public class Hal{ public static void main(String[] args) throw...
<p>One simple way which i use to avoid "Windows desktop Auto lock" is "Switch On/Off NumLock" every 6 seconds.</p> <p>Here a Java Program to Switch ON/OFF NumLock.</p> <pre><code>import java.util.*; import java.awt.*; import java.awt.event.*; public class NumLock extends Thread { public void run() { try { ...
7,621
<p>I have a free standing set of files not affiliated with any C# project at all that reside in a complicated nested directory structure.</p> <p>I want to add them in that format to a different directory in an ASP.NET web application I am working on; while retaining the same structure. So, I copied the folder into the...
<p>Drag the files / folders from Windows Explorer into the Solution Explorer. It will add them all. Note this doesn't work if Visual Studio is in Administrator Mode, because Windows Explorer is a User Mode process.</p>
<p>It's annoying that Visual Studio doesn't support this natively, but CMake could generate the Visual Studio project as a work around.</p> <p>Other than that, just use Qt Creator. It can then export a Visual Studio project.</p>
8,218
<p>It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema.</p> <p>I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, and what will I need to keep i...
<p>Do you know much about OOP? If so, look into Spring and Hibernate to keep your implementation clean and <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/01/08/Orthogonal-Code.aspx" rel="noreferrer">orthogonal</a>. If you get that, you should find TDD a good way to keep your design compact and lean, ...
<p>Split the big system to smaller pieces. And don't think that it's so complex, because it usually isn't. By thinking too complex it just ruins your thoughts and eventually the design. Some point you just realize that you could do the same thing easier, and then you redesign it.</p> <p>Atleast this has been my major ...
3,647
<p>Is it possible to re-use ABS or PLA filament material from printed parts?</p> <p>If so, what is the techniques to reform it?</p>
<p>There are a few options.</p> <ol> <li>Machines are available which grind the used plastic into fine pieces, melt it down, and extrude it as filament to be reused. <a href="http://www.filabot.com/">Filabot</a> is perhaps the most well known.</li> <li>Depending on where you live the local recycling programs may accep...
<p>If you're more interested in the recycling and reuse aspect than the re-print aspect, you could melt all the scrap filament onto a cookie sheet or into a bar (like in a bread ban). You could then manually work the material, or use a CNC machine to carve out your next thing.</p> <p>This <a href="https://www.youtube....
101
<p>I need to validate an XML string (and not a file) against a DTD description file. </p> <p>How can that be done in <code>python</code>?</p>
<p>Another good option is <a href="http://lxml.de/validation.html" rel="noreferrer">lxml's validation</a> which I find quite pleasant to use.</p> <p>A simple example taken from the lxml site:</p> <pre><code>from StringIO import StringIO from lxml import etree dtd = etree.DTD(StringIO("""&lt;!ELEMENT foo EMPTY&gt;""...
<p>from the examples directory in the libxml2 python bindings:</p> <pre><code>#!/usr/bin/python -u import libxml2 import sys # Memory debug specific libxml2.debugMemory(1) dtd="""&lt;!ELEMENT foo EMPTY&gt;""" instance="""&lt;?xml version="1.0"?&gt; &lt;foo&gt;&lt;/foo&gt;""" dtd = libxml2.parseDTD(None, 'test.dtd')...
3,661
<p>I need to index up to 500,000 entries for fastest read. The index needs to be rebuilt periodically , on disk. I am trying to decide between a simple file like a hash on disk or a single table in an embedded database. I have no need for an RDBMS engine. </p>
<p>I'm assuming you're referring to indexing tables on a relational DBMS (like mySql, Oracle, or Postgres).</p> <p>Indexes are secondary data stores that keep a record of a subset of fields for a table in a specific order.</p> <p>If you create an index, any query that includes the subset of fields that are indexed in...
<p>This is what <a href="http://en.wikipedia.org/wiki/MapReduce" rel="nofollow noreferrer">MapReduce</a> was invented for. <a href="http://hadoop.apache.org/" rel="nofollow noreferrer">Hadoop</a> is a cool java implementation. </p>
9,370
<p>I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather large (25 projects in the solution), I'd like to try VS 2008, since its theoretically faster with larger projects. </p> <p>Before doing such thing, i'd like to know if what I've read is true: can I use VS2008 in ".net 2.0" mode? I ...
<p>yes, vs2008 can "<a href="http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx" rel="nofollow noreferrer">target</a>" a framework, but i think by default, if converting from vs2005 - vs2008 it just keeps it at framework 2.0</p>
<p>Yes, the feature that enables this is Visual Studio 2008 is called multi-targeting. See <a href="http://weblogs.asp.net/scottgu/archive/2007/06/20/vs-2008-multi-targeting-support.aspx" rel="nofollow noreferrer">this link</a> for more information. To use it you simply open the Properties for your Project, and select ...
5,033
<p>I was working on a model today and I need to make the black surface into a normal surface so that the ship's cockpit is solid. I am unable to select the black surface. I tried using the flip normals feature, but I was still unable to select it. Any advice on how to make it into a solid is greatly appreciated. Thanks...
<p>The foundation of any 3D printer is the controller and the firmware. Many devices are based on Arduino type controllers, with stepper motor driver boards either integrated or added as a plug-in component.</p> <p>Some manufacturers will use in-house or outside resources and develop their own boards and firmware.</p>...
<p>this is an extension to fred_dot_u answer. As I am in the process of building my own printer, I decided to use RAMPS Arduino shield for electronics and Marlin firmware + Arduino mega2560 as a logic controller. </p> <p>As above are battle-tested, I don't need to discover wheel again, but rather focus on the mechani...
886
<p>I'm newbie at this stackexchange and I have a "FlashForge Finder"; lately there are many problems with the horizontal surfaces quality (Bottom and Top at the same time).</p> <p>As some issue guides suggests, I changed: number of solid layers, % of filling and extrusion multiplier; I use "Flashprint", so some concep...
<p>This could be caused by under extrusion, often caused by the bed being too close to the hot end / extruder nozzle. You could try to relevel the bed, or change the screws so that the bed moves down slightly. Often when levelling, you want to feel slight resistance when sliding a piece of paper between the bed an the ...
<p>This could be caused by under extrusion, often caused by the bed being too close to the hot end / extruder nozzle. You could try to relevel the bed, or change the screws so that the bed moves down slightly. Often when levelling, you want to feel slight resistance when sliding a piece of paper between the bed an the ...
1,683
<p>So apparently the wiring in my home is... questionable. Very rarely, plugging or unplugging things will cause a power dip. This is almost always the result of turning on a fan or something, is only for a moment before coming back, but its long enough to cause my printer to reset. I want to add a backup battery suppl...
<p>There are a couple of points to consider with this question. First, you will need to make sure the PSU is correctly adjusted to the float charge voltage of the 12V battery. SLA should be safe to float charge, but over voltage will damage it over time.</p> <p>One alternative solution (since powering the heaters will...
<p>This circuit is correct as it does the job (provides a charge and switch-over when needed). </p> <p>The only drawback could be that you need to ensure that the battery is sealed as during the charging process the electlorit will slowly evaporate and decrease battery capacity.</p> <p>I am personally using a UPC as ...
1,008
<p>What’s the best way to capitalize the first letter of each word in a string in SQL Server.</p>
<p>From <a href="http://www.sql-server-helper.com/functions/initcap.aspx" rel="noreferrer">http://www.sql-server-helper.com/functions/initcap.aspx</a></p> <pre><code>CREATE FUNCTION [dbo].[InitCap] ( @InputString varchar(4000) ) RETURNS VARCHAR(4000) AS BEGIN DECLARE @Index INT DECLARE @Char CHAR(...
<pre><code>IF OBJECT_ID ('dbo.fnCapitalizeFirstLetterAndChangeDelimiter') IS NOT NULL DROP FUNCTION dbo.fnCapitalizeFirstLetterAndChangeDelimiter GO CREATE FUNCTION [dbo].[fnCapitalizeFirstLetterAndChangeDelimiter] (@string NVARCHAR(MAX), @delimiter NCHAR(1), @new_delimeter NCHAR(1)) RETURNS NVARCHAR(MAX) AS BEGI...
7,875
<p>I'm trying to consume a SharePoint webservice from ColdFusion via cfinvoke ('cause I don't want to deal with (read: parse) the SOAP response itself).</p> <p>The SOAP response includes a byte-order-mark character (BOM), which produces the following exception in CF:</p> <pre><code>"Cannot perform web service invocat...
<p>I'm going to say that the answer to your question (is it possible?) is no. I don't know that definitively, but the poster who commented just above halL (<a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_09.html#comments" rel="nofollow noreferrer">in the comments on this page</a>) ga...
<p>It sounds like ColdFusion is using Apache Axis under the covers.</p> <p>This doesn't apply exactly to your solution, but I've had to deal with this issue once before when consuming a .NET web service with Apache Axis/Java. The only solution I was able to find (since the owner of the web service was unwilling to cha...
8,092
<p>So I've got a hobby site I'm working on. I've got items that are tagged and I want to associate those items with photos from Flickr. Even with restrictive searches, I might get results numbering in the thousands.</p> <p>Requirements:</p> <ol> <li>I want to display between 10-20 pictures but I want to randomize t...
<p>Not Exactly a sexy piece of code but their doesn't seem to be an automated way to find the row without just looping the table.</p> <pre><code> DataRowView newRowView = null; foreach (DataRowView tempRowView in myDataTable.DefaultView) { if (tempRowView.Row == rowToMatch) ...
<pre><code>row.Table.DefaultView[row.Table.Rows.IndexOf(row)] </code></pre> <p>This is an okay answer. But if you find yourself in this situation, you should consider learning more about DataViews and how they are used, then refactor your code to be view-centric rather than table-centric.</p>
5,241
<p>Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I:</p> <ol> <li>Safely determine that such a key exists.</li> <li>Programmatically (i.e. with code) get its value.</li> </ol> <p>I have absolutely no intention of writing anything back to the registry (for the duration of my...
<p><strong>Here is some pseudo-code to retrieve the following:</strong></p> <ol> <li>If a registry key exists</li> <li>What the default value is for that registry key</li> <li>What a string value is</li> <li>What a DWORD value is</li> </ol> <p><strong>Example code:</strong></p> <p>Include the library dependency: Adv...
<pre><code>#include &lt;windows.h&gt; #include &lt;map&gt; #include &lt;string&gt; #include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;tr1/stdint.h&gt; using namespace std; void printerr(DWORD dwerror) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAG...
5,422
<p>Apparantly when users right-click in our WPF application, and they use the Windows Classic theme, the default ContextMenu of the TextBox (which contains Copy, Cut and Paste) has a black background.</p> <p>I know this works well:</p> <pre><code>&lt;Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentati...
<p>To style ContextMenu's for all TextBoxes, I would do something like the following:</p> <p>First, in the resources section, add a ContextMenu which you plan to use as your standard ContextMenu in a textbox.<br /> e.g.</p> <pre><code>&lt;ContextMenu x:Key="TextBoxContextMenu" Background="White"&gt; &lt;MenuItem Co...
<p>Try removing the x:Key attribute from the Style resource, leaving TargetType. I know, you're supposed to have that x:Key for a resource, but if you have it along with your TargetType the Key prevails. </p> <p>Here's a sample style that I use in a project to skin all tooltips in one of my apps (this is in App.Resou...
3,102
<p>I need to join two binary files with a <code>*.bat</code> script on Windows.</p> <p>How can I achieve that?</p>
<p>Windows <code>type</code> command works similarly to UNIX <code>cat</code>.</p> <p><strong>Example 1:</strong></p> <pre><code>type file1 file2 &gt; file3 </code></pre> <p>is equivalent of:</p> <pre><code>cat file1 file2 &gt; file3 </code></pre> <p><strong>Example 2:</strong></p> <pre><code>type *.vcf &gt; all...
<p>If you have to use a batch script and have python installed here is a <a href="http://en.wikipedia.org/wiki/Polyglot_%28computing%29" rel="nofollow noreferrer">polyglot</a> answer in batch and python:</p> <pre><code>1&gt;2# : ^ ''' @echo off python &quot;%~nx0&quot; &quot; %~nx1&quot; &quot;%~nx2&quot; &quot;%~nx3&q...
8,507
<p>No, this is not a question about generics.</p> <p>I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory).</p> <p>My problem is that <code>CreateInstance</code> fails with a "No parameterless constructor defined for this object" err...
<p>To get around this, couldnt you just alter your usage as such:</p> <pre><code>public class GenericFactory&lt;T&gt; where T : MyAbstractType { public static T GetInstance() { return Activator.CreateInstance(typeof(T), true); } } </code></pre> <p>Your factory method will still be generic, but the...
<p>besides Activator.CreateInstance(typeof(T), true) to work, T should have default constructor</p>
8,166
<p>A question to those who have a 3D printer. Have you ever needed a spare throat or a heater block? Do they ever break? </p> <p>I just bought some spare parts: heaters, thermistors, nozzles... However, I am not sure if buying throats and heater blocks make any sense.</p>
<h1>Short answer</h1> <p>Yes</p> <h1>Long answer</h1> <h2>Heater bocks</h2> <p>A heater block is destroyed if one of the following happens</p> <ul> <li>Threads stripped</li> <li>Bent or otherwise deformed</li> <li>stripped grub screw</li> </ul> <p>All of these can happen by handling the block with too much force when s...
<p>Parts don't have to break or bent, they may become unusable by other issues as well!</p> <p>In addition to <a href="/a/12115">the answer of @Trish</a>, if you clog your hotend, or the hotend/heater block/nozzle gets buried deep into solidified filament (see image below), it might be much easier just to replace the ...
1,604
<p>Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location).</p>
<p>Use <code>a.equal? b</code></p> <p><a href="http://www.ruby-doc.org/core/classes/Object.html" rel="noreferrer">http://www.ruby-doc.org/core/classes/Object.html</a></p> <blockquote> <p>Unlike ==, the equal? method should never be overridden by subclasses: it is used to determine object identity (that is, a.equal?...
<p>You could also use <code>__id__</code>. This gives you the objects internal ID number, which is always unique. To check if to objects are the same, try</p> <blockquote> <p><code>a.__id__ = b.__id__</code></p> </blockquote> <p>This is how Ruby's standard library does it as far as I can tell (see <code>group_by</c...
5,617
<p>I do not want TortoiseSVN to alert me with sounds - e.g. when it fails to update.</p> <p>How do I turn off sounds in TortoiseSVN?</p>
<p>Right click > TortoiseSVN > Settings > System Sounds..</p> <p>Scroll down to the bottom.</p>
<p>You can do this from the Sounds panel in Control Panel.</p>
5,502
<p>the <a href="https://www.thingiverse.com/thing:763622" rel="noreferrer">3D Benchy</a> is everywhere. It is one of <strong>the</strong> top test prints if you look away from a simple cube.</p> <p>But what makes the Benchy a good test print at all? It does have almost no critical dimensions that would be measurable to...
<h2>the 3D Benchy isn't a specific calibration test</h2> <p>With the Benchy you don't see if your printer is calibrated in any axis, but it is a general use-case test for a model that can show you many of the issues you might face in a normal print. For all intents and purposes, it is more a general Benchmark item than...
<p>Benchy is cute. That goes a long way in attracting attention.</p> <p>The benchy is one of the earlier STLs that was freely available to download, dating from April 2015, and was released under the Creative Commons Sharealike licence, which clearly states the requirements and limitations/requirements.</p> <p>Curious...
2,078
<p>I would like to print parts (e.g. jewellery) for use which I don't want to look or feel like a plastic, but metal-like, so briefly people won't see much difference.</p> <p>Are there any specific type of home-printers that can achieve that? Or it's rather kind of filament that you should use?</p>
<p>If you'd like to print on RepRap like <a href="https://en.wikipedia.org/wiki/Fused_deposition_modeling" rel="nofollow noreferrer">FDM printers</a>, you cannot print from metal, but you can use some filament that tries to look like metal. I have good experience with <a href="http://colorfabb.com/bronzefill" rel="nofo...
<p>There's also an interesting discussion of printing with specially-designed solder alloys, at <a href="http://blog.reprap.org/2011/06/new-approach-to-printing-metals.html" rel="nofollow noreferrer">RepRap: Blog - A new approach to printing metals</a>. </p> <p>The author settled on 57.5%Sn, 41.3%Bi, 1.2% In, which be...
91
<p>I'm tired of adding ten link libraries into my project, or requiring eight of them to use my own. I'd like to take existing libraries like libpng.a, libz.a, libjpeg.a, and combine them into one single .a library. Is that possible? How about combining .lib libraries?</p>
<p>You could extract the object files from each library with</p> <pre class="lang-none prettyprint-override"><code>ar x &lt;library name&gt; </code></pre> <p>and then merge them all into a new library with</p> <pre class="lang-none prettyprint-override"><code>ar cs &lt;new library name&gt; &lt;list each extracted objec...
<p>Combining several third-party libraries into one could create more problems for you—for instance, if two of those libraries define a common symbol which your program doesn't use. Now you've got to extract all (or all-but-one) of the instances of the common symbol before you combine the libraries.</p>
3,414
<p>When using an aggregate control in some reports you would prefer to see a blank field instead of 0. There does not appear to be a way to do this automatically. Does anyone have a way that this can be done. Note, you want to maintain the '0' value for the field in cases when you export, but you want to show a blan...
<p>There are a number of ways to solve this. The two primary are to use either visibility rules or highlights to create conditional formatting. The visibility is particularly attractive since it is easy to only apply the format rules to particular types of output (e.g. HTML).</p> <p>For this particular case, there a...
<p>Just an FYI, after working with this for a while longer, I have found that it is just easier to use Visibility rules. The one big advantage is that you can easily configure different visibility for different output formats. So for PDF it may be best to use blanks, but for Excel you may want the 0 values.</p>
8,079
<p>I am in the process of figuring out a cache strategy for our current setup, currently have multiple web servers and wanted to know what is the best way to cache data in this environment. I have done research about MemCache and the native asp.net caching but wanted to get some feedback first. Should I go with a Linux...
<p>What about checking out <a href="http://code.msdn.microsoft.com/velocity" rel="nofollow noreferrer">Microsoft Velocity</a>? Another option if you don't want to start using Microsoft CTP-ware is to check out <a href="http://www.alachisoft.com/ncache/" rel="nofollow noreferrer">Nache</a> which allows distributed cache...
<p>Another open source choice other than memcached probably worth looking into is Shared Cache. I haven't played with it. But it says to have c# native implementation.</p>
2,614
<p>I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. Right now the solution I have worked out is to update my local copy of the code and...
<p>I've found <a href="http://samba.anu.edu.au/rsync/" rel="nofollow noreferrer">rsync</a> extremely useful for synchronizing directory trees across multiple systems. If you have shell access to your server from a development workstation, you can regularly check out code locally and run rsync, which will transfer only ...
<p>You don't provide information on what is allowed through the firewall. I'm not familiar with UnleashIT.</p> <p>I guess you could have a script that exports from SVN to a folder on the SVN server. The script then zips the exported files. You can then transport the ZIP file however you want and extract to the deploym...
6,367
<p>Using Django's built in models, how would one create a triple-join between three models.</p> <p>For example:</p> <ul> <li>Users, Roles, and Events are the models.</li> <li>Users have many Roles, and Roles many Users. (ManyToMany)</li> <li>Events have many Users, and Users many Events. (ManyToMany)</li> <li>But fo...
<p><strong>zacherates</strong> writes:</p> <blockquote> <p>I'd model Role as an association class between Users and Roles (...)</p> </blockquote> <p>I'd also reccomed this solution, but you can also make use of some syntactical sugar provided by Django: <a href="http://docs.djangoproject.com/en/dev/topics/db/models...
<p>I'd model Role as an association class between Users and Roles, thus,</p> <pre><code>class User(models.Model): ... class Event(models.Model): ... class Role(models.Model): user = models.ForeignKey(User) event = models.ForeignKey(Event) </code></pre> <p>And enforce the one role per user per ev...
9,856
<p><em>(see <a href="https://stackoverflow.com/questions/53316/hibernate-crops-clob-values-oddly">here</a> for the problem I'm trying to solve)</em></p> <p>How do you get hibernate to log clob values it's going to insert. It is logging other value types, such as Integer etc.</p> <p>I have the following in my log4j co...
<p>Try using:</p> <pre><code>log4j.logger.net.sf.hibernate=DEBUG log4j.logger.org.hibernate=DEBUG </code></pre> <p>That's the finest level you'll get. If it does not show the information you want, then it's not possible.</p>
<p>Try to set log4j.logger.org.hibernate.type=TRACE and see if that helps.</p>
7,678
<p>I've asked this question to the forums on the Mootools website and one person said that my class selection was corrupted before an admin came along and changed my post status to invalid. Needless to say this did not help much. I then posted to a google group for Mootools with no response. My question is why doesn...
<p>Ok, it looks like there are a couple of issues here. As far as I can tell, there is no such thing as a "droppable" in mootools. This means your events like 'enter', 'leave' and 'drop' won't work. (These are events on the drag object)</p> <p>If you change those names to events that elements in mootools have (as in, ...
<p>According to <a href="http://mootools.net/docs/more/Drag/Drag.Move" rel="nofollow">Mootools Docs</a>, "<code>droppables</code>" is one of the options expected by the <code>Drag.Move</code> class. In fact, this is the array of elements that interact with the element when it fires the "<code>drop</code>," "<code>enter...
3,117
<p>More and more mobile devices are consuming content on my eCommerce sites. IPhones, Blackberries, PSPs, Windows Mobile, etc and I need some ideas how to handle repurposing my data using CSS templates for these devices. Any ideas would be great. </p>
<p>I recommend you look at what Delta Airlines does with CSS at <a href="http://mobile.delta.com" rel="nofollow noreferrer">http://mobile.delta.com</a>. They get help from a company called MShift who does a bunch of mobile banking (which, obviously, has to work on many different devices).</p> <p>You can get some insp...
<p>I would say keep it as simple as possible. Internet on phones can be 3g/wifi or as slow as you can possibly imagine. I would keep the test large so it's easier to read, and links easy to click if you are targeting a touch device. I would also say no to images unless they are 1kb or less.</p>
9,381
<p>I liked the discussion at <a href="https://stackoverflow.com/questions/31693/differences-in-generics">Differences in Generics</a>, and was wondering whether there were any languages that used this feature particularly well.</p> <p>I really dislike Java's <code>List&lt;? extends Foo&gt;</code> for a <code>List</code...
<p>Haskell implements type-constructor parameterisation (generics, or parametric polymorphism) quite well. So does Scala (although it needs a bit of hand-holding sometimes).</p> <p>Both of these languages have higher-kinded types (a.k.a. abstract type constructors, or type-constructor polymorphism, or higher-order pol...
<p>I think that C# and VB.NET do a good job with generics.</p>
7,378
<p>On a PLA print where stringing has occurred, what is the best way to remove it during post processing?</p> <p>Should I simply cut it with a hobby knife and sand the surface or are the better techniques to use?</p>
<p>Use a hobby knife with a chisel blade (straight edge perpendicular to handle, beveled on one side only).</p> <p>Apply with beveled edge against workpiece. Raise the handle in small increments while stroking over the flaw until it is entirely removed. This provides pretty good control to prevent gouging.</p> <p>Avoi...
<p>I pull them off by hand and then a few quick passes with a cigarette lighter works for me.</p>
2,107
<p>This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object?</p> <p>And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface:</p> <pre><code>private IWebBase Find...
<p>No, from MSDN on HttpContext.Current: "Gets or sets the HttpContext object for the current HTTP request." </p> <p>In other words it is an HttpContext object, not a Page.</p> <p>You can get to the Page object via HttpContext using:</p> <pre><code>Page page = HttpContext.Current.Handler as Page; if (page != null...
<p>Please see my answer : <br/> <a href="https://stackoverflow.com/questions/1054123/why-httpcontext-current-handler-is-null">Why HttpContext.Current.Handler is null?</a> <br/><br/> Maybe resolved your problem.<br/></p>
8,254
<p>Does anyone know how the developers of Marlin decided to name it that?</p>
<p>As far as I know Erik van der Zalm started Marlin. He is from the Netherlands and Zalm translates to "salmon". One of the design goals of Marlin was to make it faster than the other firmware available at that time. And a marlin is a very fast swimming fish.</p> <p>Some firmwares developed after Marlin also joined t...
<p>Yes, it probably is totally off-topic, but fun too, so I'll try to get an answer in, before the question gets closed.</p> <p>The best place to ask would be the <a href="https://reprap.org/forum/list.php?415" rel="nofollow noreferrer">Firmware - Marlin forum</a>, on RepRap.org.</p> <p>The question is there now, <a ...
1,311
<p>Is there a good way to exclude certain pages from using a HTTP module?</p> <p>I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config:</p> <pre><code>&lt;system.web&gt; &lt;!-- ... --&gt; &lt;httpModules&gt; &lt;add name="SessionValidatio...
<p>You could use an HTTPHandler instead of an HTTPModule. Handlers let you specify a path when you declare them in Web.Config. </p> <pre><code>&lt;add verb="*" path="/validate/*.aspx" type="Handler,Assembly"/&gt; </code></pre> <p>If you must use an HTTPModule, you could just check the path of the request and if it'...
<p>Here is some simple example how to filter requests by extension... the example below exclude from the processing files with the specific extensions. Filtering by file name will look almost the same with some small changes...</p> <pre><code>public class AuthenticationModule : IHttpModule { private static readonl...
9,639
<p>I'm just getting dirty in WinForms, and I've discovered, through a lovely tutorial, the magic of dragging a database table onto the design view of my main form. So, all is lovely, I've got my DataGridView with all of the columns represented beautifully.</p> <p>BUT...</p> <p>When I run my application against this b...
<p>Since it is an Identity column and you haven't saved it to the database yet it is -1. I am assuming here that this is before you save the table back to the database, correct? You need to perform the insert before that value will be set correctly.</p>
<p>Since it is an Identity column and you haven't saved it to the database yet it is -1. I am assuming here that this is before you save the table back to the database, correct? You need to perform the insert before that value will be set correctly.</p>
5,942
<p>I want to implement an "automatic update" system for a windows application. Right now I'm semi-manually creating an <a href="http://connectedflow.com/appcasting/" rel="noreferrer">"appcast"</a> which my program checks, and notifies the user that a new version is available. (I'm using <a href="http://nsis.sourcefo...
<p>There is no solution quite as smooth as Sparkle (that I know of).</p> <p>If you need an easy means of deployment and updating applications, <a href="http://en.wikipedia.org/wiki/ClickOnce" rel="noreferrer">ClickOnce</a> is an option. Unfortunately, it's inflexible (e.g., no per-machine installation instead of per-u...
<p>Just came here from an answer to my own question on the same subject - I mention one other <a href="http://windowsclient.net/articles/appupdater.aspx" rel="nofollow noreferrer">updating solution</a> in my <a href="https://stackoverflow.com/questions/49747/autoupdating-net-applications">question</a>. It uses a stub ...
5,766
<p>I'm a 1-2 man band at work, and so far I've been using VSS for two reasons 1) the company was using that when I started a few months ago, and 2) it is friendly with Visual Studio.</p> <p>Needless to say, I would very much like to upgrade to a not-so-archaic source control system. However, I don't want to give up t...
<p>If you can pay for it, <a href="http://www.sourcegear.com/" rel="nofollow noreferrer">Source Gear Vault</a> is designed to be a drop-in replacement.</p> <p>If you can't pay, Subversion with AnkhSVN works well but is a bit different.</p>
<p>For one or two users, <a href="http://www.perforce.com" rel="nofollow noreferrer">perforce</a> is free as well. Once you need more that two users though, you have to start paying for it. They have a SCC plugin as well to allow integration into Visual Studio (and any other program that supports that interface).</p>...
9,288
<p>This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...</p> <p>I have a list of checkboxes, and I can get them with the selector <code>'input[type=checkbox]'</code>. I want the user to be able to shift-click and select a range of checkboxes. To accompli...
<p>The following selector should also work in jQuery: <code>input:checkbox</code>.</p> <p>You can then string the <code>:gt(index)</code> and <code>:lt(index)</code> filters together, so if you want the 5th to 7th checkboxes, you'd use <code>input:checkbox:gt(4):lt(2)</code>.</p> <p>To get the index of the currently ...
<p>Thanks for the answer, samjudson.</p> <p>After further experimentation, I found that you can even use just <code>$(':checkbox')</code> to select them. It's interesting that you can use the <code>.slice()</code> function to get the range, but you also have the option of doing it in the selector with <code>:gt</code>...
6,542
<p>I'd like to ask a question then follow it up with my own answer, but also see what answers other people have.</p> <p>We have two large files which we'd like to read from two separate threads concurrently. One thread will sequentially read fileA while the other thread will sequentially read fileB. There is no lock...
<p>The problem seems to be in Windows I/O scheduling policy. According to what I found <a href="http://engr.smu.edu/~kocan/7343/fall05/slides/chapter11.ppt" rel="noreferrer" title="I/O management and disk scheduling">here</a> there are many ways for an O.S. to schedule disk requests. While Linux and others can choose b...
<p>I would create some kind of in memory thread safe lock. Each thread could wait on the lock until it was free. When the lock becomes free, take the lock and read the file for a defined length of time or a defined amount of data, then release the lock for any other waiting threads.</p>
3,061
<p>I've learned in College that you always have to free your unused Objects but not how you actually do it. For example structuring your code right and so on. Are there any general rules on how to handle pointers in C++? </p> <p>I'm currently not allowed to use boost. I have to stick to pure c++ because the framework...
<p>I have worked with the embedded Symbian OS, which had an excellent system in place for this, based entirely on developer conventions.</p> <ol> <li>Only one object will ever own a pointer. By default this is the creator.</li> <li>Ownership can be passed on. To indicate passing of ownership, the object is passed as a...
<ul> <li>When you have to use manage memory manually, make sure you call delete in the same scope/function/class/module, which ever applies first, e.g.:</li> <li>Let the caller of a function allocate the memory that is filled by it, do not return new'ed pointers.</li> <li>Always call delete in the same exe/dll as you c...
4,709
<p>What built-in PHP functions are useful for web scraping? What are some good resources (web or print) for getting up to speed on web scraping with PHP?</p>
<p>Scraping generally encompasses 3 steps: </p> <ul> <li>first you GET or POST your request to a specified URL </li> <li>next you receive the html that is returned as the response</li> <li>finally you parse out of that html the text you'd like to scrape.</li> </ul> <p>To accomplish steps 1 and 2, belo...
<p>The curl library allows you to download web pages. You should look into regular expressions for doing the scraping.</p>
4,660
<p>How can I find out which node in a tree list the context menu has been activated? For instance right-clicking a node and selecting an option from the menu. </p> <p>I can't use the TreeViews' <code>SelectedNode</code> property because the node is only been right-clicked and not selected.</p>
<p>You can add a mouse click event to the TreeView, then select the correct node using GetNodeAt given the mouse coordinates provided by the MouseEventArgs.</p> <pre><code>void treeView1MouseUp(object sender, MouseEventArgs e) { if(e.Button == MouseButtons.Right) { // Select the clicked node tr...
<p>If you want the context menu to be dependent on the selected item you're best move I think is to use Jonesinator's code to select the clicked item. Your context menu content can then be dependent on the selected item.</p> <p>Selecting the item first as opposed to just using it for the context menu gives a few advan...
2,465
<p>I've always preferred to use long integers as primary keys in databases, for simplicity and (assumed) speed. But when using a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="noreferrer">REST</a> or Rails-like URL scheme for object instances, I'd then end up with URLs like this:</p> <pre>...
<p>I can't say about the web side of your question. But uuids are great for n-tier applications. PK generation can be decentralized: each client generates it's own pk without risk of collision. And the speed difference is generally small.</p> <p>Make sure your database supports an efficient storage datatype (16 bytes...
<p>As long as you use a DB system with efficient storage, HDD is cheap these days anyway...</p> <p>I know GUID's can be a b*tch to work with some times and come with some query overhead however from a security perspective they are a savior. </p> <p>Thinking security by obscurity they fit well when forming obscure URI...
2,782
<p>There was a contest to develop 3D printable files for the International Space Station's 3D printer. The winner got a 3D printer ... runners up got Fluke DVOM's and all entrants got a t-shirt.</p> <p>ISS 3D Print Contest</p> <p>They offer 3 materials: ABS, HDPE, and PEI+PC ... I'm not familiar with the last one. ...
<p>Ultem 9085, the most common ultem resin used for AM, is a blend of PEI-PC, as seen here <a href="https://www.sabic-ip.com/gepapp/Plastics/servlet/ProductsAndServices/Product/series?sltPrdline=ULTEM&amp;sltPrdseries=Aerospace%20and%20Transportation&amp;search=Search#searchresults" rel="nofollow">https://www.sabic-ip....
<p>PEI - polyethermide is a "common" coating for heated print beds. PC is so many different things, but in this context, it's likely to mean polycarbonate plastic. From what I've read, it's challenging to print with and especially challenging to get a good bond on the build plate. One reference suggests to use a PEI co...
350
<p>I am using a BAUDrate of 115200 since I cannot make a connection to my printer with the advised 250000 rate. Are there any downsides or limits I reach earlier given by the lower BAUDrate?</p>
<p><a href="https://learn.sparkfun.com/tutorials/serial-communication/rules-of-serial" rel="nofollow noreferrer">Baud rate</a> is the rate at which information is transferred in a communication channel, given as a number of bits per second (bps). So a baud rate of 250000 is capable of transferring a <em>maximum</em> of...
<p>If your printer doesn't have an SD card then the whole communication between computer and arduino is performed "live". There is kinda buffer of data which arduino can swallow. Then it needs to process it (and then can send some reports to your app) and then arduino is ready to get new "set" of instructions to work o...
342
<p>This came up in one of my groups today. That we could not color bend, or mix 3d printing filaments. I have researched but I am not finding anything talking about Plastic mixing in an extruder.</p> <p>Why is it that we cannot take say a Diamond hotend, or a hotend with 5+ inputs, and mix any color we want? (assuming...
<p>I just started with google and phrase "3d printing color mixing" and on the first place (in fact first two were valueless adverts) I got this <a href="http://www.instructables.com/id/Full-Color-Mixing-3D-Printer/?ALLSTEPS" rel="nofollow noreferrer">Instructables - DIY Full Color Mixing 3D Printer</a>.</p> <p><stron...
<p>If you clearly observe the geometry of the print it has printed in different colours .the part is designed in such a way that it has the small height gap between the each colour but we cannot seen this gap in one projection plane.. We can print only in direct drive extrusion .by changing the filament of different co...
367
<p>Can anyone help me find/confirm the information needed to setup the CR-10 in the Cura Software</p> <p>I have following settings from research:</p> <p><strong>Printer Settings</strong></p> <ul> <li>x = 300&nbsp;mm</li> <li>y = 300&nbsp;mm</li> <li>z = 400&nbsp;mm</li> <li>Build Plate = Rectangular</li> <li>Mach...
<p><strong>GCode flavor</strong>: the firmware your machine uses. Google tells me CR-10 uses Marlin, so you should select that. Volumetric Marlin is not very common.</p> <p>Print Head Settings <strong>X/Y min/max</strong> define the bounding box of the area your print head takes up. Measure the distance from the centr...
<p>In addition to <a href="/a/4438">this answer</a>, the "Machine Center is Zero", should <strong>not</strong> be checked. It will begin the print in the current location of the Printing Head.</p>
653
<p>I have a query where I wish to retrieve the oldest X records. At present my query is something like the following:</p> <pre><code>SELECT Id, Title, Comments, CreatedDate FROM MyTable WHERE CreatedDate &gt; @OlderThanDate ORDER BY CreatedDate DESC </code></pre> <p>I know that normally I would remove the 'DESC' key...
<p>Why not just use a subquery?</p> <pre><code>SELECT T1.* FROM (SELECT TOP X Id, Title, Comments, CreatedDate FROM MyTable WHERE CreatedDate > @OlderThanDate ORDER BY CreatedDate) T1 ORDER BY CreatedDate DESC </code></pre>
<p>Embed the query. You take the top x when sorted in ascending order (i.e. the oldest) and then re-sort those in descending order ... </p> <pre><code>select * from ( SELECT top X Id, Title, Comments, CreatedDate FROM MyTable WHERE CreatedDate &gt; @OlderThanDate ORDER BY CreatedDate ) a order by cr...
8,593
<p>For those of you familiar with <a href="http://www.gallio.org" rel="noreferrer">Gallio</a>, what Advantages and Disadvantages have you experienced using this tool, a so-called Test Automation Platform?</p>
<p>We're using Gallio/MbUnit for a year now. We're quite happy with it, the Gallio guys keep introducing cool new features and the development is active. If you decide to use it, here are some hints/notes:</p> <ol> <li>Buy yourself a TestDriven.NET license - I think it is a must for Gallio unit tests, since Resharper ...
<p>On the advantages front, integration with everything is quite nice :) Seriously, I'm a huge fan of the experimental integration with Visual Studio Team System (screenshots <a href="http://blog.bits-in-motion.com/2008/05/announcing-gallio-v30-alpha-3.html" rel="nofollow noreferrer">here</a>). I think that really low...
8,177
<p>I have a VB6.0 project and I want to convert it in VB.Net.</p> <p>In my VB6.0 application some of the MDI Child form’s height is 17000 and width is 13000. Now I want to set the same form size in VB.Net forms, but it allows maximum form width = 1036, height = 780 for resolution 1024x768.</p> <p>How can I increase f...
<p>Your classic VB units are in what are called "twips". You will most likely be able to divide those numbers by 12 or 15 (depending on if you are using large or small fonts) and you will get a certain number of pixels.</p>
<p>I think the VB6 units are not the same with the VB.Net one. So you have to do a conversion.</p>
5,643
<p><strong>Here is the context</strong><br/> I've got an old car for which I have a small plastic piece who is broken. As it's an old car and a very specific piece, I can't find it anymore. So I was thinking about 3D printing it.</p> <p>My problem is this piece is on the carburetor, so close to the engine. This means,...
<p>The number you're looking for is the <a href="https://en.wikipedia.org/wiki/Glass_transition" rel="noreferrer">glass transition temperature</a> (the lowest temperature at which the material can flow or warp), not the melting point. This depends on what material you're using; approximate temperatures for common prin...
<p>Nylon is probably your best bet. It is resistant to some chemicals as well. Figure on printing it at around 250 °C.</p> <p>It might do the job.</p>
1,530
<p>I know this might be a no-brainer, but please read on.</p> <p>I also know it's generally not considered a good idea, maybe the worst, to let a browser run and interact with local apps, even in an intranet context.</p> <p>We use Citrix for home-office, and people really like it. Now, they would like the same kind o...
<blockquote> <p><i>We use Citrix for home-office, and people really like it. Now, they would like the same kind of environment at work, a nice page where every important application/document/folder is nicely arranged and classified in an orderly fashion</i></p> </blockquote> <p>I haven't used Citrix very many times,...
<blockquote> <p><i>The standard citrix homepage (or how we use it) is a simple web page with program icons. Click on it, and the application get's delivered to you. People want the same thing, at work, with their applications/folders/documents. And because I'm a web developer, and they asked me, I do it with a web pa...
5,177
<p>I need to run a JavaScript function onLoad(), but only do it if the page loaded the first time (i.e. is not the result of a postback).</p> <p>Basically, I need to check for IsPostBack in JavaScript.</p> <p>Thank you.</p>
<p>Server-side, write:</p> <pre><code>if(IsPostBack) { // NOTE: the following uses an overload of RegisterClientScriptBlock() // that will surround our string with the needed script tags ClientScript.RegisterClientScriptBlock(GetType(), "IsPostBack", "var isPostBack = true;", true); } </code></pre> <p>Then...
<p>You can create a hidden textbox with a value of 0. Put the onLoad() code in a if block that checks to make sure the hidden text box value is 0. if it is execute the code and set the textbox value to 1.</p>
8,439
<p>Materials used in space need to not outgas significantly </p> <p>An answer to this question: <a href="https://3dprinting.stackexchange.com/questions/91/would-3d-printed-objects-outgas-in-vacuum?newreg=63cb72665132436c92ff1a842afac664">Would 3d-printed objects outgas in vacuum?</a></p> <p>referred to the NASA outg...
<p>If you have a makerspace in your area, you'll likely find individuals with reasonable mechanical skills suitable for simple kit assembly. Most kits are engineered to be reasonable assembly, not rocket surgery. Makers are by nature capable of construction, often from raw materials, and kits are typically not particul...
<p>I agree that a local makerspace is a good option, but I will say this...</p> <p>Buying a kit and building it yourself, even with some frustration and learning curves, will help immensely with your ability to calibrate and troubleshoot issues later. If someone else builds it for you, chances are if something goes w...
720
<p>I want to put a spiral lid on top of a container. When the lid opens, then the spiral mechanism will rotate into the container. Is there a name for this mechanism? If not, would something like this be possible?</p>
<p>It sounds like you're talking about an <a href="https://en.wikipedia.org/wiki/Diaphragm_(optics)" rel="nofollow noreferrer">iris diaphragm</a>. This has many parts that slide against each other, and would best be printed as separate parts, then assembled.</p>
<p>No spiral lids that I know of. I'm not sure how they would work, anyway. There are plenty of designs with hemispherical lids -- so-called "Venus" boxes. Check Yeggi:</p> <p><a href="https://www.yeggi.com/q/venus+box/" rel="nofollow noreferrer">Yeggi : Venus box</a></p>
1,599
<p>I hope I can explain this clearly enough, but if not let me know and I'll try to clarify.</p> <p>I'm currently developing a site using ColdFusion and have a mod_rewrite rule in place to make it look like the site is using PHP. Any requests for index.php get processed by index.cfm (the rule maps *.php to *.cfm).</p>...
<p>You can use the <code>S</code> flag to skip the <code>404</code> rule, like this:</p> <pre><code>RewriteEngine on # Do not separate these two rules so long as the first has S=1 RewriteRule (.*)\.php$ $1.cfm [S=1] RewriteRule \.cfm$ - [R=404] </code></pre> <p>If you are also using the <code>Alias</code> option the...
<p>Post the rules you already have as a starting point so people don't have to recreate it to help you.</p> <p>I would suggest testing [L] on the rule that maps .php to .cfm files as the first thing to try.</p>
3,032
<p>Given a string of JSON data, how can I safely turn that string into a JavaScript object?</p> <p>Obviously I can do this unsafely with something like:</p> <pre><code>var obj = eval("(" + json + ')'); </code></pre> <p>but that leaves me vulnerable to the JSON string containing other code, which it seems very danger...
<p><a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" rel="noreferrer"><code>JSON.parse(jsonString)</code></a> is a pure JavaScript approach so long as you can guarantee a reasonably modern browser.</p>
<p>Try this. This one is written in typescript.</p> <pre><code>export function safeJsonParse(str: string) { try { return JSON.parse(str); } catch (e) { return str; } } </code></pre>
6,681
<p>I would like to get data from from different webpages such as addresses of restaurants or dates of different events for a given location and so on. What is the best library I can use for extracting this data from a given set of sites? </p>
<p>If using python, take a good look at Beautiful Soup (<a href="http://crummy.com/software/BeautifulSoup" rel="noreferrer">http://crummy.com/software/BeautifulSoup</a>).</p> <p>An extremely capable library, makes scraping a breeze.</p>
<p>What language do you want to use?</p> <p>curl with awk might be all you need.</p>
9,263
<p>Probably the question sounds a little strange; however, I am looking for a filament which is breakable and not so steady and reliable as PLA. I want to print parts similar to the following gears for instance (They are from Lego, a children's toy). <a href="https://i.stack.imgur.com/dsvt3.png" rel="nofollow noreferre...
<h2>deliberate/planned obsolescence is the term you look for</h2> <p>If you design parts that break after some time, you plan their obsolescence. That you do by a deliberate choice of material and working conditions. Designing a part that will break after a certain time can be done by choosing the correct stresses that...
<p>This metod will be difficult with gears but doable. Print cold and slightly under extruded. This will cause part to fail in layers. You may need to print the part on side to ensure a non functioning gear. Use PLA or PETG. Breaking TPU is next to impossible.</p>
1,197