instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I'm working on a Scheme interpreter written in C. Currently it uses the C runtime stack as its own stack, which is presenting a minor problem with implementing continuations. My current solution is manual copying of the C stack to the heap then copying it back when needed. Aside from not being standard C, this solut... | <p>I remember reading an article that may be of help to you: <em><a href="http://home.pipeline.com/~hbaker1/CheneyMTA.html" rel="noreferrer">Cheney on the M.T.A.</a></em> :-)</p>
<p>Some implementations of Scheme I know of, such as <a href="http://sisc.sourceforge.net/" rel="noreferrer">SISC</a>, allocate their call f... | <p>Use an explicit stack instead.</p>
| 2,824 |
<p>We are getting very slow compile times, which can take upwards of 20+ minutes on dual core 2GHz, 2G Ram machines.</p>
<p>A lot of this is due to the size of our solution which has grown to 70+ projects, as well as VSS which is a bottle neck in itself when you have a lot of files. (swapping out VSS is not an optio... | <p>The Chromium.org team listed several options for <a href="http://dev.chromium.org/developers/how-tos/build-instructions-windows" rel="noreferrer">accelerating the build</a> (at this point about half-way down the page):</p>
<blockquote>
<p>In decreasing order of speedup:</p>
<ul>
<li>Install Microsoft hotfi... | <p>Slow Visual Studio Performance … Solved!
September 24th, 2014 by Uzma Abidi</p>
<p>I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or... | 7,932 |
<p>My ender3 came with a BuildTak-clone surface, and as I was a little too vigorous in getting the print off the bed (I had failed to level right and printed a bit too tight to the bed, resulting in SUPER strong adhesion), I needed to replace it.</p>
<p>Peeling off the black was easy. The plastic sheet that held the g... | <p>In my experience, we deal with 3M™ Adhesive Transfer Tape 468MP; high-temperature glue residue. To remove the leftover glue from my Aluminium build plate I found that it works best if I apply <a href="https://en.wikipedia.org/wiki/Paint_thinner" rel="nofollow noreferrer">paint thinner</a>. </p>
<p>I ran out of acet... | <p>Cleaning up the aluminium build platform was rather easy in a three step process as I figured out:</p>
<h3>Preparation</h3>
<p>Get the old bed-surface off and any film layers that stick to the original glue. Don't bother to try to scrape off the glue, it is wasted time.</p>
<h3>Solvent</h3>
<p>To remove the stic... | 1,178 |
<p><strong>My Goal</strong></p>
<p>I would like to have a main processing thread (non GUI), and be able to spin off GUIs in their own background threads as needed, and having my main non GUI thread keep working. Put another way, I want my main non GUI-thread to be the owner of the GUI-thread and not vice versa. I'm no... | <p><strong>Application.Run</strong> method displays one (or more) forms and initiates the standard message loop which runs until all the forms are closed. You cannot force a return from that method except by closing all your forms or forcing an application shutdown.</p>
<p>You can, however, pass an <strong>Application... | <p>I'm sure this is possible if you hack at it hard enough, but I'd suggest it is not a good idea.</p>
<p>'Windows' (that you see on the screen) are highly coupled to processes. That is, each process which displays any GUI is expected to have a Message Loop, which processes all of the messages which are involved with ... | 2,501 |
<p>I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys.</p>
<p>Please note this is for XP.</p>
| <p><a href="http://psacake.com/web/jr.asp" rel="nofollow noreferrer">http://psacake.com/web/jr.asp</a> contains full instructions, and here's an excerpt:</p>
<pre>
While it may seem odd to think about purposefully causing a Blue Screen Of Death (BSOD), Microsoft includes such a provision in Windows XP. This might come... | <p>I don't know of any keyboard short cuts, but are you looking for like in task manager, when you right click on a process and select "Create Dump"?</p>
| 8,388 |
<p>Let me use the following example to explain my question:</p>
<pre class="lang-csharp prettyprint-override"><code>public string ExampleFunction(string Variable) {
return something;
}
string WhatIsMyName = "Hello World";
string Hello = ExampleFunction(WhatIsMyName);
</code></pre>
<p>When I pass the vari... | <p>What you want isn't possible directly but you can use Expressions in C# 3.0:</p>
<pre><code>public void ExampleFunction(Expression<Func<string, string>> f) {
Console.WriteLine((f.Body as MemberExpression).Member.Name);
}
ExampleFunction(x => WhatIsMyName);
</code></pre>
<p>Note that this relies... | <p><strong>No.</strong> I don't think so.</p>
<p>The variable name that you use is for your convenience and readability. The compiler doesn't need it & just chucks it out if I'm not mistaken.</p>
<p>If it helps, you could define a new class called <code>NamedParameter</code> with attributes <code>Name</code> and <c... | 9,770 |
<blockquote>
<p>What's the best way to make an element of 100% minimum height across a
wide range of browsers ?</p>
</blockquote>
<p>In particular if you have a layout with a <code>header</code> and <code>footer</code> of fixed <code>height</code>,</p>
<p>how do you make the middle content part fill <code>100%</c... | <p>I am using the following one: <a href="http://www.xs4all.nl/~peterned/examples/csslayout1.html" rel="noreferrer">CSS Layout - 100 % height</a></p>
<blockquote>
<p><strong>Min-height</strong></p>
<p>The #container element of this page has a min-height of 100%. That
way, if the content requires more height t... | <p>just share what i've been used, and works nicely</p>
<pre><code>#content{
height: auto;
min-height:350px;
}
</code></pre>
| 4,486 |
<p>I am currently working on (or at least planning) a couple of projects that work with large amounts of repetitive data. The kind of data that works well in a spreadsheet or database, but is nasty in XML. :)</p>
<p>NetCDF seems like a great option for a file format. However, my work is in C# and there is no "official... | <p>First, are you sure that NetCDF is the right choice? If you want to interact with other programs that need to read in large amounts of data and they already support NetCDF, then it's probably a great choice. There aren't that many standard and well-supported file formats that support large multidimensional arrays.... | <p>In a project we are using the ucar netcdf implementation in c# using ikvm. IKVM can be used to 'convert' java projects into .Net libraries without a use for java VM. I have not done any performance check but it is a simple way to get netcdf in c# :).</p>
<p><a href="http://www.unidata.ucar.edu/downloads/netcdf/netc... | 8,484 |
<p>Is there a maximum number of inodes in a single directory? </p>
<p>I have a directory of over 2 million files and can't get the <code>ls</code> command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit?</p>
| <p><code>df -i</code> should tell you the number of inodes used and free on the file system.</p>
| <p>Another option is <a href="http://www.gnu.org/software/findutils/" rel="nofollow noreferrer"><code>find</code></a>:</p>
<p><code>find . -name * -exec somcommands {} \;</code></p>
<p><code>{}</code> is the absolute filepath.</p>
<p>The advantage/disadvantage is that the files are processed one after each other.</... | 6,160 |
<p>I'm using <code>ByteBuffers</code> and <code>FileChannels</code> to write binary data to a file. When doing that for big files or successively for multiple files, I get an <code>OutOfMemoryError</code> exception.
I've read elsewhere that using <code>Bytebuffers</code> with NIO is broken and should be avoided. Does a... | <p>I would say don't create a huge ByteBuffer that contains ALL of the data at once. Create a much smaller ByteBuffer, fill it with data, then write this data to the FileChannel. Then reset the ByteBuffer and continue until all the data is written.</p>
| <p>The previous two responses seem pretty reasonable. As for whether the command line switch will work, it depends how quickly your memory usage hits the limit. If you don't have enough ram and virtual memory available to at least triple the memory available, then you will need to use one of the alternate suggestions g... | 4,830 |
<p>I had a friend request that I print out the Bathymetry of Lake Michigan as a gift for her PhD adviser. I went to NOAA and the site had a few files for the Bathymetry of Lake Michigan.</p>
<p>Files and types are located here: <a href="http://www.ngdc.noaa.gov/mgg/greatlakes/michigan.html" rel="noreferrer">http://www... | <p>In order to properly get an STL file out of a point cloud, you'll need some tool to help triangulate the points to create proper shell surfaces. The shell that is created in an STL is what the slicing engine will "slice".</p>
<p>I'm not as familiar with the full potential of MeshLab, but I would think this... | <p>You can do this using MATLAB, or possibly Octave (the open-source version of MATLAB). I'm doing this right now to print a globe with exaggerated topography and bathymetry. MATLAB has tons of tools for importing data. I'm sure you can import the Lake Michigan bathymetry data, though you may have to hunt for an import... | 215 |
<p>I need an associative container that makes me index a certain object through a string, but that also keeps the order of insertion, so I can look for a specific object by its name or just iterate on it and retrieve objects in the same order I inserted them.</p>
<p>I think this <a href="http://www.ddj.com/cpp/1844062... | <p>You've asked for the canonical reason why Boost::MultiIndex was made: list insertion order with fast lookup by key. <a href="http://www.boost.org/doc/libs/1_36_0/libs/multi_index/doc/tutorial/basics.html#list_fast_lookup" rel="nofollow noreferrer">Boost MultiIndex tutorial: list fast lookup</a></p>
| <p>@wesc: STL has std::map... so what's the difference with unordered_map? I don't think STL would implement twice the same thing and call it differently.</p>
| 5,655 |
<p>I would like to offer a database connection prompt to the user. I can build my own, but it would be nice if I can use something that somebody else has already built (maybe something built into Windows or a free library available on the Internet). Anybody know how to do this in .Net?</p>
<p><strong>EDIT:</strong> I ... | <p>You might want to try using <a href="http://msdn.microsoft.com/en-us/magazine/cc163409.aspx" rel="nofollow noreferrer">SQL Server Management Objects</a>. This MSDN article has a good sample for prompting and connecting to a SQL server.</p>
| <p>The only "built in" connection string functionality that I could think of is the one that comes up when you run a CMD script (essentially a batch file) that runs SQL scripts. However I'm not sure if it's something built into Visual Studio.</p>
<p>It's really simple to make one anyway. If you don't want the user to ... | 7,663 |
<p>I have a table in a SQL Server 2005 database with a trigger that is supposed to add a record to a different table whenever a new record is inserted. It seems to work fine, but if I execute an Insert Into on the master table that uses a subquery as the source of the values, the trigger only inserts one record in the ... | <p>Your trigger is only using the first row from 'Inserted'. This is a common misunderstanding when dealing with SQL triggers for the first time. The trigger fires per update not per row.</p>
<p>For example if you do the following:-</p>
<p>update products
set title = 'geoff de geoff'</p>
<p>this would update all the... | <p>I just want to second @Gordon Bell on his answer...</p>
<p>"Catch" the values the very moment they are being inserted. You do not really need the cursor in this situation (or maybe you have a reason?).</p>
<p>A simple TRIGGER might be all you need:</p>
<p><a href="http://dbalink.wordpress.com/2008/06/20/how-to-sq... | 3,882 |
<p>What follows is a regular expression I have written to match multi-line pre-processor macros in C / C++ code. I'm by no means a regular expressions guru, so I'd welcome any advice on how I can make this better.</p>
<p>Here's the regex:</p>
<pre><code>\s*#define(.*\\\n)+[\S]+(?!\\)
</code></pre>
<p>It should match... | <p>This is a simple test program I knocked up:</p>
<pre><code>#!/usr/bin/env python
TEST1="""
#include "Foo.h"
#define bar foo\\
x
#include "Bar.h"
"""
TEST2="""
#define bar foo
#define x 1 \\
12 \\
2 \\\\ 3
Foobar
"""
TEST3="""
#define foo(x) if(x) \\
doSomething(x)
"""
TEST4="""
#define foo(x) if(x) ... | <pre><code>start = r"^\s*#define\s+"
continuation = r"(?:.*\\\n)+"
lastline = r".*$"
re_multiline_macros = re.compile(start + continuation + lastline,
re.MULTILINE)
</code></pre>
| 8,569 |
<p>I'm evaluating Server 2008. My C++ executable is getting this error. I've seen this error on MSDN that seems to have required a hot-fix for several previous OSes. Anyone else seen this? I get the same results for the 32 & 64 bit OS.</p>
<p>Code snippet:</p>
<pre><code>HRESULT GroupStart([in] short iClientId, [... | <p>We ran into the same error recently with a client/server app communicating via DCOM. It turned out that the size of a marshalled interface pointer going across the wire (i.e., not local) had changed (gotten bigger). You might like to check whether your code is doing any special marshalling via CoMarshalInterface or ... | <p>We ran into the same error recently with a client/server app communicating via DCOM. It turned out that the size of a marshalled interface pointer going across the wire (i.e., not local) had changed (gotten bigger). You might like to check whether your code is doing any special marshalling via CoMarshalInterface or ... | 9,086 |
<p>When 3D Printing moves into public beta, you're going to want to get the word out. And fast! One of the best ways to advertise ourselves across the entire Stack Exchange network is through community ads. </p>
<h3>So what are these "Community Ads?"</h3>
<p>Graduated sites allow the community to advertise relevant p... | <p>I'll try my hand at it and try to get the ball rolling.</p>
<p><a href="https://3dprinting.stackexchange.com/"><img src="https://i.stack.imgur.com/CBJNE.png" alt="Been here?"></a></p>
| <p>As mentioned, here's one related to the <a href="http://www.thingiverse.com/thing:30808" rel="nofollow noreferrer"><strong>Occupy Thingiverse</strong></a> movement. It's simple, but it has a bit of history within the 3D printing community.</p>
<p><a href="https://i.stack.imgur.com/9vUg7.png" rel="nofollow noreferre... | 16 |
<p>Let's say I want to run a .NET application on a machine where the .NET framework is not available; Is there any way to compile the application to native code?</p>
| <p>Microsoft has an article describing how you can <a href="http://msdn.microsoft.com/en-us/library/ht8ecch6(VS.71).aspx" rel="noreferrer">Compile MSIL to Native Code</a></p>
<p>You can use <a href="http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx" rel="noreferrer">Ngen</a>.</p>
<blockquote>
<p>The Native Imag... | <p>I think it's not possible. You will need to distribute .NET FW as well. If you want to compile .NET app to native code, use NGen <a href="http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx" rel="nofollow noreferrer">tool</a></p>
| 6,769 |
<p>I have a need to create a "transactional" process using an external API that does not support COM+ or .NET transactions (Sharepoint to be exact)</p>
<p>What I need to do is to be able to perform a number of processes in a sequence, but any failure in that sequence means that I will have to manually undo all of the ... | <p>If your changes are done to the SharePoint object model, you can use the fact that changes are not committed until you call the <code>Update()</code> method of the modified object, such as <code>SPList.Update()</code> or <code>SPWeb.Update()</code>.</p>
<p>Otherwise, I would use the <em>Command</em> Design Pattern.... | <p>You might want to have a look at the Compensating Resource Manager:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/8xkdw05k(VS.80).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/8xkdw05k(VS.80).aspx</a></p>
| 4,217 |
<p>I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code?</p>
<p>This is the wrapper that I have which calls GetData() defined in a C++ file:</p>
<pre><code> [DllImport("Unmanaged.dll", CallingConvention=CallingConvention... | <p>Check the Debug tab on your project's properties page. There should be an "Enable unmanaged code debugging" checkbox. This worked for me when we developed a new .NET UI for our old c++ DLLs.</p>
<p>If your unmanaged DLL is being built from another project (for a while ours were being built using VS6) just make sur... | <p>To anyone using WinDbg:</p>
<p>1>Setup symbols</p>
<p>Look at these commands. (Help: in console .hh < command> )</p>
<pre><code>.sympath
.sympath+
.symfix
</code></pre>
<p>2>Set up source path</p>
<pre><code>.srcpath
</code></pre>
<p>3>Load SOS extention to debug managed / mixed mode programs.</p>
<p>(Mak... | 8,224 |
<p>I have a noobish question for any graphics programmer.</p>
<p>I am confused how some games (like Crysis) can support both DirectX 9 (in XP) and 10 (in Vista)?</p>
<p>What I understand so far is that if you write a DX10 app, then it can only runs in Vista.</p>
<p>Maybe they have 2 code bases -- one written in DX9 ... | <p>They have two rendering pipelines, one using DX9 calls and one using DX10 calls. The APIs are not compatible, though a majority of any game engine can be reused for either. If you want some Open Source examples of how different rendering pipelines are done, look at something like Ogre3d, which supports OpenGL, DX9, ... | <p>It is likely that they have an abstraction layer and they develop against that. At run-time they instantiate the DX9 or DX10 wrapping concrete engines.</p>
<p>I imagine their abstraction is positioned very close to the DirectX layer and simply provides DX9 with sensible manual implementations of DX10 functions or ... | 9,165 |
<p>I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences.</p>
<p>Is there a <em>standard</em> subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary betwe... | <p>Compare Regular Expression Flavors</p>
<p><a href="http://www.regular-expressions.info/refflavors.html" rel="noreferrer">http://www.regular-expressions.info/refflavors.html</a></p>
| <p>There's no standard engine. However, the POSIX Extended Regular Expression format is a valid subset of most engines and is probably as close as you'll get to a standardised subset.</p>
| 4,987 |
<p>Is there a distributed version control system (git, bazaar, mercurial, darcs etc.) that can handle files larger than available RAM?</p>
<p>I need to be able to commit large binary files (i.e. datasets, source video/images, archives), but I don't need to be able to diff them, just be able to commit and then update w... | <p>It's been 3 years since I asked this question, but, as of version 2.0 Mercurial includes the <a href="https://www.mercurial-scm.org/wiki/LargefilesExtension" rel="nofollow noreferrer">largefiles extension</a>, which accomplishes what I was originally looking for:</p>
<blockquote>
<p>The largefiles extension allow... | <p>I came to the conclusion that the best solution in this case would be to use the ZFS.</p>
<p>Yes ZFS is not a DVCS but:</p>
<ul>
<li>You can allocate space for repository via creating new FS</li>
<li>You can track changes by creating snapshots</li>
<li>You can send snapshots (commits) to another ZFS dataset</li>
<... | 9,577 |
<p>Example: I have two shared objects (same should apply to .dlls). The first shared object is from a third-party library, we'll call it libA.so. I have wrapped some of this with JNI and created my own library, libB.so. Now libB depends on libA.</p>
<p>When webstarting, both libraries are places in some webstart worki... | <p>Static compilation proved to be the only way to webstart multiple dependent native libraries.</p>
| <p>Are both native libraries packaged into a <em>signed</em> jar which is listed as</p>
<pre><code><nativelib ...>
</code></pre>
<p>In the JNLP file?</p>
| 2,664 |
<p>I need to reformat my machine but I have so many user/passwords stored in FF2 that I just keep putting it off. Yes I know about backing up the entire profile and restoring it. But for some reason my profile has many issues and I want to start fresh with that as well.</p>
<p>Are the username and passwords stored in ... | <p>There is a Firefox add-on called <a href="https://addons.mozilla.org/en-US/firefox/addon/2848" rel="nofollow noreferrer">Password Exporter</a>. It can export to XML or CSV files that can be imported in another browser or computer.</p>
| <p>Alas, this won't solve the re-importing problem, but check out <a href="http://wejn.org/stuff/moz-export.html" rel="nofollow noreferrer">http://wejn.org/stuff/moz-export.html</a></p>
<p>They have a single html page with a small javascript section that exports your passwords. Save the html to your desktop, read thro... | 6,161 |
<p>I have a web application written in C# that consumes several internal web services. We have a development tier, a testing tier, and a production tier. Also, we use the <code>WSDL.exe</code> command to generate a <code>Proxies.cs</code> file for a given tier's web services.</p>
<p>When we are ready to deploy our c... | <p>There are a number of way to do it. A NAnt build script will do it, but I think the most commonly accepted method now is to use MSBuild. See <a href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx" rel="nofollow noreferrer">MSDN</a> for details.</p>
| <p>Our company uses a combination of NANT + Cruise Control + Custom Utility apps to build our products. More specifically, the <a href="http://nant.sourceforge.net/release/latest/help/tasks/exec.html" rel="nofollow noreferrer"> task</a> in NANT will allow you to fire off those command-line applications such as WSDL.ex... | 3,856 |
<p>We are in a stage of creating a prototype of some IoT device with some electric boards and sensors.
The device will be connected to the power and the boards inside might be warm a bit.</p>
<p>What material whould you recommended to print it? Will you recommend it to production as well?
Thanks</p>
| <p>Well I got a perfect print as follows:</p>
<ol>
<li>Loaded the .stl file.</li>
<li>Set Cura to use the 'Good' profile downloaded from CHEPCLUB
(recommended by a friend).</li>
<li>Used <strike>Pritt-stick</strike> Scotch (glue stick) on the bed.</li>
</ol>
<p>I was quite loath to use glue stick, as I thought heated b... | <p>For a good adhesion the print bed should be free of any oil or fat. Wipe the print bed with pure alcohol just befor the start of printing.</p>
| 2,041 |
<p>I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own messages.</p>
<p>It would also work to monitor for when a paste operation i... | <p>My best suggestion would be to create a webservice on each site that the other could call with the information that needs to get passed. If security is necessary, it's easy to add an SSL-like authentication scheme (or actual SSL even, if you like) to this system to ensure that only the two servers are able to talk t... | <p>@jmein - you've described how to create a modal popup (which is exactly what jqModal does) however you've missed that the content of the modal window is served from another domain. The two domains involved belong to two separate companies so can't be combined in the way you describe.</p>
| 5,311 |
<p>What tools/websites do you use to read JavaDocs? </p>
<p>I currently use Firefox with 20+ tabs open when working on a J2EE project to have all the documentation available which is not very usable, is eating too much memory and is not searchable.</p>
<p>What I would expect from such a tool/website:</p>
<ul>
<li>Ag... | <p>If you use Eclipse, it offers support for Javadocs. For example, hovering your mouse over a method call will display a tooltip showing you the Javadoc for that method. Documentation for the core Java classes are supported out of the box. However, if your project uses any additional libraries (JAR files), some con... | <p>Doxygen (<a href="http://www.doxygen.nl/" rel="nofollow noreferrer">http://www.doxygen.nl/</a>) might fit the bill. </p>
<p>EDIT: I may have misread your question, doxygen is a tool to generate documentation and models based off your code and javadoc. </p>
| 9,904 |
<p>I am currently working on a project and my goal is to locate text in an image. OCR'ing the text is not my intention as of yet. I want to basically obtain the bounds of text within an image. I am using the AForge.Net imaging component for manipulation. Any assistance in some sense or another?</p>
<p>Update 2/5/09:
I... | <p>This is an active area of research. There are literally oodles of academic papers on the subject. It's going to be difficult to give you assistance especially w/o more deatails. Are you looking for specific types of text? Fonts? English-only? Are you familiar with the academic literature? </p>
<p>"Text detection" i... | <p>If you're ok with using an online API for this, the API at <a href="http://www.wisetrend.com/wisetrend_ocr_cloud.shtml" rel="nofollow noreferrer">http://www.wisetrend.com/wisetrend_ocr_cloud.shtml</a> can do text detection in addition to just OCR.</p>
| 2,411 |
<p>I'm interested in finding online APIs where you could perform a call to some third party service with some print preparation request with my model (i.e. "heal a model" or "set up support") and get in return GCODE file I can send to a 3D printer.
My input will be :</p>
<ul>
<li>The 3d model (obj, stl)</li>
<li>My pr... | <p>There are printers designed for medical use, and the manufacturers supply them with varying levels of <a href="http://www.medicalplasticsnews.com/opinion/passing-the-test_1/" rel="nofollow">certification and testing</a>, however I've not seen a filament manufacturer certify their material as bio-compatible separate ... | <p>If you want to know something about what you are questioning, it is interesting to you to read <a href="http://e-nable.org/resources/prosthetics-students-consultation/" rel="nofollow noreferrer">http://e-nable.org/resources/prosthetics-students-consultation/</a></p>
<p>That's a link with complementary information h... | 118 |
<p>Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system.</p>
<p>Pre-SP1, this was working fine (and still works fine on our... | <p>I have battled this problem myself last week and consider myself somewhat of an expert now ;)</p>
<p>I'm 99% sure that not all dlls and static libraries were recompiled with the SP1 version. You need to put</p>
<pre><code>#define _BIND_TO_CURRENT_MFC_VERSION 1
#define _BIND_TO_CURRENT_CRT_VERSION 1
</code></pre>
... | <p>I just remembered another trick that I used to find out which static libraries were ill-behaving: 'grep' through the static libraries for the string '21022'. HOWEVER, don't use the 'normal' grep tools like wingrep because they won't show you these strings (they think it's a binary file and look for the raw, non-unic... | 8,426 |
<p>Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity). </p>
<p>Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you... | <p>We've used IronPython to build our flagship spreadsheet application (40kloc production code - and it's Python, which IMO means loc per feature is low) at <a href="http://www.resolversystems.com/" rel="noreferrer">Resolver Systems</a>, so I'd definitely say it's ready for production use of complex apps.</p>
<p>There... | <p>I know I'm probably stating the obvious, but don't forget that the quality of the development team and their familiarity with the technology will have a major impact on your ability to deliver. </p>
<p>If you have a strong team, then it's probably not an issue if they're familiar. But if you have people who are mor... | 5,632 |
<p>I've been wanting to play around with writing my own language for a while now (ostensibly for the learning experience) and as such need to be relatively grounded in the construction of Parsers, Interpreters, and Compilers. So:</p>
<ul>
<li><strong>Does anyone know of any good resources on constructing Parsers, Inte... | <p>The best paper I ever read on compilers is dated <strong>1964</strong>
"META II a syntax-oriented compiler writing language" by Val Schorre.
(<a href="http://doi.acm.org/10.1145/800257.808896" rel="noreferrer">http://doi.acm.org/10.1145/800257.808896</a>)</p>
<p>In 10 pages, he shows you how to build an astoundingl... | <p>It's an old book, and rather dated, but I've found <em>Brinch Hansen on Pascal Compilers</em> to be a very practical introduction to creating a language and building the elements of a compiler. Despite the name, it's not specific to Pascal. It's very worthwhile if you can find a copy.</p>
| 6,317 |
<p>I have a simple CAML query like</p>
<pre><code><Where><Eq><Field="FieldName"><Value Type="Text">Value text</Value></Field></Eq></Where>
</code></pre>
<p>And I have a variable to substitute for <code>Value text</code>. What's the best way to validate/escape the text t... | <p>When working with XML, always use the XML API that works with your programming environment. Don't try to roll your own XML document building and escaping code. As Longhorn213 mentioned, in .Net all the appropriate stuff is in the System.XML namespace. Trying to to write your own code for writing XML documents wil... | <p>use <code>System.Xml.Linq.XElement</code> and <code>SetValue</code> method. This will format the text <em>(assuming a string)</em>, but also allows you to set xml as the value.</p>
| 3,778 |
<p>How should I run another program from within my <code>C</code> program? I need to be able to write data into <code>STDIN</code> of the launched program (and maybe read from it's <code>STDOUT</code>)</p>
<p>I am not sure if this is a standard C function. I need the solution that should work under Linux.</p>
| <p>You want to use <code>popen</code>. It gives you a unidirectional pipe with which you can access stdin and stdout of the program.</p>
<p>popen is standard on modern unix and unix-like OS, of which Linux is one :-)</p>
<p>Type</p>
<pre><code>man popen
</code></pre>
<p>in a terminal to read more about it.</p>
<p>... | <p>I think you can use </p>
<blockquote>
<p><code>freopen</code></p>
</blockquote>
<p>for this .</p>
| 9,632 |
<p>Alright it can be a lame question, but everybody uses these things differently. What's some of the best time savers out there for this IDE.
<BR><BR>Tom</p>
| <p>Don't forget <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd>, which displays a list of all the keyboard shortcut combinations (just in case you forget any of those listed here).</p>
| <p>CTRL + b: to build the project under c++</p>
<p>CTRL + SHIFT + f: to format your code (c++)</p>
| 7,855 |
<p>Let me try to explain what I need. I have a server that is visible from the internet. What I need is to create a ASP.NET application that get the request of a web Site and send to a internal server, then it gets the response and publish the the info. For the client this should be totally transparent.</p>
<p>For dif... | <p>Why won't any old proxy software work for this? Why does it need to be an ASP.NET application? There are TONS of tools out there (both Windows and *nix) that will get the job done quite easily. Check <a href="http://www.squid-cache.org/" rel="nofollow noreferrer">Squid</a> or <a href="https://web.archive.org/web/... | <p>I use apache mod_proxy and mod_proxy_balancer. Works awesome running 5 domains a cluster of 4 web boxes.</p>
| 3,257 |
<p>What's the best way to terminate a program and then run additional code from the program that's being terminated? For example, what would be the best way for a program to self update itself?</p>
| <p>You have a couple options:</p>
<p>You could use another application .exe to do the auto update. This is probably the best method.</p>
<p>You can also rename a program's exe while it is running. Hence allowing you to get the file from some update server and replace it. On the program's next startup it will be usi... | <p>I don't know of a way to do it without a second program that the primary program launches prior to shutting down. Program 2 downloads and installs the changes and then relaunches the primary program.</p>
| 6,805 |
<p>I have multiple selects:</p>
<pre><code><select id="one">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
<select id="two">
<option value="1">one</option>
<option value="2">two&... | <p>I am not (currently) a user of jQuery, but I can tell you that you need to temporarily disconnect your event handler while you repopulate the items or, at the least, set a flag that you then test for and based on its value, handle the change.</p>
| <p>Or you can just hide the option you don't want to show...</p>
<pre><code>function hideSelected($one, $two)
{
$one.bind('change', function()
{
var val = $one.val();
$two.find('option:not(:visible)').show().end()
.find('option[value='+val+']').hide().end();
})
}
hideSelected($o... | 6,665 |
<p>What options / methods / software are available to convert a JAR file to a managed .NET assembly?<br>
Please provide all commercial and non-commercial methods in the answer.<br>
These don't include solutions which require Java to be installed on the host machine.</p>
| <p>I could be wrong, but I'm pretty sure that's impossible. The java byte code is different to the code produced to run on the CLR.</p>
<p><strong>Snarky answer</strong>: Get the source code, and port it.</p>
<p>EDIT: A little poking comes up with <a href="http://sourceforge.net/projects/ikvm/" rel="noreferrer">http:... | <p>Confronted with this situation last year, I wrote a small wrapper (in java) that read the inputs from a temp file, invoked the jar and placed the output in anther temp file. The .NET project would create the input file, call the JVM and start the wrapper, wait for it to finish and read the output file. Quick and Dir... | 9,457 |
<p>I am using VS2008 and Resharper. Resharper creates a directory _Resharper.ProjectName. These files provide no value for source control that I am aware of and cause issues when committing changes. How can I get SVN to ignore them? I am using TortoiseSVN as my interface for SVN.</p>
<p>EDIT: You guys are fast.</p... | <p><a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-ignore.html" rel="noreferrer">Here's a link to show the ignoring process in TortoiseSVN</a></p>
| <p>SVN only controls what you put into it when creating your repository. Don't just import your entire project folder but import a "clean" folder BEFORE doing a build. After the build you get all the object files or your _Resharper folder etc. but they are not version controlled.</p>
<p>I forgot: the <pre>svn:ignore</... | 9,484 |
<p>I recently "needed" a zip function in Perl 5 (while I was thinking about <a href="https://stackoverflow.com/questions/11/how-do-i-calculate-relative-time">How do I calculate relative time?</a>), i.e. a function that takes two lists and "zips" them together to one list, interleaving the elements.</p>
<p>(Pseudo)exam... | <p>Assuming you have exactly two lists and they are exactly the same length, here is a solution originally by merlyn (Randal Schwartz), who called it perversely perlish:</p>
<pre><code>sub zip2 {
my $p = @_ / 2;
return @_[ map { $_, $_ + $p } 0 .. $p - 1 ];
}
</code></pre>
<p>What happens here is that for a ... | <p>This is totally not an elegant solution, nor is it the best solution by any stretch of the imagination. But it's fun!</p>
<pre><code>package zip;
sub TIEARRAY {
my ($class, @self) = @_;
bless \@self, $class;
}
sub FETCH {
my ($self, $index) = @_;
$self->[$index % @$self][$index / @$self];
}
s... | 5,925 |
<p>I run an ASP.NET website solution with a few other projects in it. I've known that MSBuild projects are capable of this, but is it the best way? Are they easy to create? Is nAnt, CruiseControl.NET or any other solution better?</p>
<p>When I build the site (using <a href="http://msdn.microsoft.com/en-us/asp.net/aa33... | <p>Here's an example of a Web Deployment Project scripting this sort of task in the .wdproj file:</p>
<pre><code> <Target Name="AfterBuild">
<!-- ============================ Script Compression============================ -->
<MakeDir Directories="$(OutputPath)\compressed" />
<Exec Co... | <p>CruiseControl.NET solves a different problem (continuous integration) ... however, I've had great success with NAnt for specifically what you're asking. There's a learning curve, but once you get proficient you'll wonder how you ever got along w/o it.</p>
| 3,659 |
<p>Is there a classification of method of control most (FDM) 3D printers fall under?</p>
<p>From a 1986robotics textbook<sup>ref</sup> I was reading they defined three classes of control:</p>
<p>1) Pick and place</p>
<p>2) Point to point</p>
<p>3) Continuous path</p>
<p>However, both point to point and continuous ... | <p>The question is if robots classification terminology the textbook sketches applies to 3D printing?</p>
<p>Servos (closed loop) are used in robots to guarantee position (you don't want to accumulate an error after repetitive movement), most 3D printers use open loop steppers that are instructed on a point to point b... | <p>3D Printers fall under additive manufacturing and then can be classified by the material first. Usually, the material dictates entirely what the design looks like and it would be foolish to not differentiate what you look at by this first. For some materials, there are a couple of subtypes that tell us about which m... | 1,510 |
<p>We are currently evaluating different applications that interface with Visual Studio 2008 (C#) and Subversion to do automated builds of our core libraries. We are hoping to have nightly builds performed and either email the list of changes made to each developer or have the latest versions be pushed to each worksta... | <p>Cruise Control.net (ccnet) does everything you are looking for. Its pretty easy to use, just make sure if you are going to run it as a service, you give it an account and don't make it run as network service, that way you can give it rights on intranet boxes and have it do xcopy deploys.</p>
<p>It has all kinds of ... | <p>A couple of tidbits about working with cc.net and msbuild. If you are building C/C+= projects, msbuild is, um, unreliable at least with VS 2005 (and perhaps earlier). I have not tested with VS 2008. We found that sometimes msbuild would work properly, sometimes not. In trying to solve the problem, we found vcbui... | 7,513 |
<p>Has anybody got this to actually work? Documentation is non existent on how to enable this feature and I get missing attribute exceptions despite having a 3.5 SP1 project. </p>
| <p>I found that it doesn't work with internal/private types, but making my type public it worked fine. This means no anonymous types either :(</p>
<p>Using reflector I found the method ClassDataContract.IsNonAttributedTypeValidForSerialization(Type) that seems to make the decision. It's the last line that seems to be ... | <p>There are several serialization options in WCF: Data contract, XML Serialization and and raw data payload. Which of these are you trying to use? From the question, it seems you are trying to use something other than objects decorated with datacontact attributes. Is that what you are asking?</p>
| 8,859 |
<p>We are developing a middleware SDK, both in C++ and Java to be used as a library/DLL by, for example, game developers, animation software developers, Avatar developers to enhance their products.</p>
<p>Having created a typical API using specific calls for specific functions I am considering simplifying the API by u... | <p>Yes, this is a feasible idea. But I'm not sure the benefits would justify the costs. REST is best applied to a networked application scenario, oriented around requests and responses. While there are definite learning curve advantages to a uniform interface, those advantages can be present in almost any well-designed... | <p>Remember that REST is not specific to HTTP, and does not rely on just the 4 HTTP verbs. The verbs you have and can use depend on what protocol you're using.</p>
| 8,799 |
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/83547/algorithm-to-find-which-numbers-from-a-list-of-size-n-sum-to-another-number">Algorithm to find which numbers from a list of size n sum to another number</a> </p>
</blockquote>
<p>What is a good algorithm ... | <p>You are looking for the coin change problem:</p>
<ul>
<li><p><a href="http://en.wikipedia.org/wiki/Coin_problem" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Coin_problem</a></p></li>
<li><p><a href="http://www.egr.unlv.edu/~jjtse/CS477/DP%20Coin%20Change.html" rel="nofollow noreferrer">http://www.egr.unl... | <p>Start with the largest bills and work down. With each denomination, start with the largest number of those bills and work down. You might need fewer of a large denomination because you need multiple smaller ones to hit a value on the head.</p>
| 9,257 |
<p>What is the JavaScript to scroll to the top when a button/link/etc. is clicked?</p>
| <pre><code><a href="javascript:scroll(0, 0)">Top</a>
</code></pre>
| <p>actually, this works by itself, no need to define it.</p>
<pre><code><a href="#top">top</a>
</code></pre>
<p>This is a "magic" hashname value that does not need to be defined in browsers.</p>
<p>Just like this will "reload" the page.</p>
<pre><code><a href="/">reload</a>
</code></pre>
| 7,134 |
<p>How does unix handle full path name with space and arguments ?<br>
In windows we quote the path and add the command-line arguments after, how is it in unix?</p>
<pre><code> "c:\foo folder with space\foo.exe" -help
</code></pre>
<p><strong>update:</strong></p>
<p>I meant how do I recognize a path from the command ... | <p>You can either quote it like your Windows example above, or escape the spaces with backslashes:</p>
<pre><code> "/foo folder with space/foo" --help
/foo\ folder\ with\ space/foo --help
</code></pre>
| <p>If the normal ways don't work, trying substituting spaces with <code>%20</code>.</p>
<p>This worked for me when dealing with SSH and other domain-style commands like <code>auto_smb</code>.</p>
| 7,358 |
<p>While going through university and from following the development of SO, I've heard a lot about the Model-View-Controller architectural design pattern. I inadvertently used the MVC pattern even before I knew what it was, and still use it in my everyday job. From what I've seen, it's probably the most popular pattern... | <ol>
<li>Passive View - <a href="http://martinfowler.com/eaaDev/PassiveScreen.html" rel="noreferrer">http://martinfowler.com/eaaDev/PassiveScreen.html</a></li>
<li>Supervising Controller - <a href="http://martinfowler.com/eaaDev/SupervisingPresenter.html" rel="noreferrer">http://martinfowler.com/eaaDev/SupervisingPrese... | <p>You can roll your own MVC with the current ASP.NET framework and still keep the postback model.</p>
<p><a href="http://www.codeproject.com/KB/aspnet/RollingYourOwnMVCwithASP.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/aspnet/RollingYourOwnMVCwithASP.aspx</a></p>
| 4,411 |
<p>I have a form element that contains multiple lines of inputs. Think of each line as attributes of a new object that I want to create in my web application. And, I want to be able to create multiple new objects in one HTTP POST. I'm using Javascript's built-in cloneNode(true) method to clone each line. The problem ... | <p>Don't put handler on each link (this really should be a button, BTW). Use <a href="http://www.quirksmode.org/js/events_order.html" rel="noreferrer">event bubbling</a> to handle <em>all</em> buttons with one handler:</p>
<pre><code>formObject.onclick = function(e)
{
e=e||event; // IE sucks
var target = e.tar... | <p>Looks like you're using jQuery? It has a method to clone an element with events: <a href="http://docs.jquery.com/Manipulation/clone#true" rel="nofollow noreferrer">http://docs.jquery.com/Manipulation/clone#true</a></p>
<p>EDIT: Oops I see you're using Prototype.</p>
| 4,927 |
<p>Like many others on this site I am considering a move to ASP.NET MVC for future projects. Currently my sites are running the traditional ASP.NET 2.0 Web Forms, and it works OK for us, so my other option is just to stick with what I know and make the move to ASP.NET 3.5 with the integrated AJAX stuff.</p>
<p>I'm wo... | <p>To implement a user control you do the following call:</p>
<pre><code><% Html.RenderPartial("~/Views/Shared/MyControl.ascx", {data model object}) %>
</code></pre>
<p>You may also see the older syntax which as of PR5 is not valid anymore</p>
<pre><code><%= Html.RenderUserControl("~/Views/Shared/MyControl.... | <p>As Nick suggested, you will indeed be able to render your user controls, but obviously the page-cycle, pagestate and postback from traditional ASP Webforms won't work anymore, thus making your controls most likely useless.</p>
<p>I think you'll have to rewrite most of your complex controls to port your website to M... | 6,311 |
<p>Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1? I have tried Code Snippet by Roman Roan and Developer Formatter by Gilberto Saraiva. But they don't seem to work as described in the documentation and are mangling the code snippets instead of prettifying them.</p>
| <p>I use <a href="http://wordpress.org/extend/plugins/wp-syntax/" rel="noreferrer">WP-Syntax</a> and it's worked very well for me. It's supported every language I've thrown at it so far, and the colors can be customized for a particular theme (though the defaults look just fine too)</p>
| <p>You should also checkout <a href="http://code.google.com/p/syntaxhighlighter/" rel="nofollow noreferrer">syntaxhighlighter</a> from Google Code.</p>
| 5,627 |
<p>I'm printing with a Prusa MK3, with the following settings:</p>
<ul>
<li>3 perimeters</li>
<li>50 % infill</li>
<li>infill overlap: 50 %</li>
</ul>
<p>The filament is Polyalchemy emerald green (PLA). Nozzle temperature: 210 °C.</p>
<p>On a simple part (it's a keychain), the shell detaches if I appl... | <p>I ultimately concluded that the material isn't great. I printed this part with multiple other PLAs and never observed any problem. The Polyalchemy PLA looks great, but for any part that has some sort of mechanical constraint, it behaves poorly.</p>
| <p>I am looking at your picture, and I realize that it is not only that the perimeter is detaching from the infill, but also that the perimeter is breaking.</p>
<p>Once the perimeter breaks, the weaker connection with the infill will surely break, too.</p>
<p>You could try:</p>
<ol>
<li>Using more than two perimeter la... | 1,531 |
<p>While this may seem like terribly noobish question, I'm sure one day someone will have same problem.</p>
<p>I own a ZONESTAR P802QSU (Bowden extruder) and all of sudden my extruder motor stopped working. What I did:</p>
<ol>
<li>I check whether or not motor is moving freely - I can rotate it without any problems m... | <p>Changing the PSU with one with a higher amperage will <em><strong>not</strong></em> make the bed heat up any faster unless the PSU is underrated for the amperage required and the voltage is dropping as a result of the load. This can be checked by measuring the output voltage with a multimeter (when the PSU is loaded... | <p>May I recommend an alternative approach, which does not require any change of hardware? The time required to heat the bed is not huge, so either via USB from your computer or from the front panel, instruct your printer to heat the bed first, while you're setting everything else up (loading gcode files, changing fi... | 892 |
<p>Can anyone recommend a decent C image library?</p>
<p>I'm after loaders for bmp, gif, jpg, png and tga.</p>
<p>I want to use this for programming my <strong>Sony Playstation Portable</strong>, so opensource would be very handy.</p>
<p>After some googleing I've found FreeImage and CImg, but both feel rather heavy,... | <p>If you control the images you're loading, the lightest loader I know is Sean Barrett's awesome <a href="http://nothings.org/stb_image.c" rel="noreferrer">stb_image.c</a> (direct link to single file source code!).</p>
<p>There are also other very worthwhile libraries on Sean's site such as a tiny TrueType rasterizer... | <p><a href="http://code.google.com/p/kgui/source/browse/trunk/kguiimage.cpp" rel="nofollow noreferrer">Here</a> is some code I wrote for handling images. It is in c++ ( not c ) but you should be able to easily extract the BMP and GIF load code. It's licensed LGPL. </p>
<p>I use the libpng and jpeglib for decompressing... | 7,269 |
<p>I have an AppleScript program which creates XML tags and elements within an Adobe InDesign document. The data is in tables, and tagging each cell takes .5 seconds. The entire script takes several hours to complete.</p>
<p>I can post the inner loop code, but I'm not sure if SO is supposed to be generic or specific. ... | <p>I figured this one out.</p>
<p>The document contains a bunch of data tables. In all, there are about 7,000 data points that need to be exported. I was creating one root element with 7,000 children.</p>
<p>Don't do that. Adding each child to the root element got slower and slower until at about 5,000 children Apple... | <blockquote>
<p>I can post the inner loop code, but I'm not sure if SO is supposed to be generic or specific. I'll let the mob decide.</p>
</blockquote>
<p>The code you post as an example can be as specific as you (or your boss) is comfortable with - more often than not, it's easier to help you with more specific de... | 3,266 |
<p>Good morning everyone,</p>
<p>I am developing a consulting job in a clinic of dental CT scans.</p>
<p>This work involves the development of administrative software, and preparing a routine for conversion of tomographic files in DICOM format to STL format. The files in STL format will be used for both visualization... | <p>The marching cubes algorithm can convert voxel data into a surface mesh. A global threshold to determine the surface in the greyvalues is used.
This <a href="https://pyscience.wordpress.com/2014/09/11/surface-extraction-creating-a-mesh-from-pixel-data-using-python-and-vtk/" rel="nofollow">article</a> might be helpf... | <p>There is this software that should work: <a href="https://www.slicer.org/" rel="nofollow">https://www.slicer.org/</a></p>
<p>If that doesn't cut it, I use this site to convert images to STL: <a href="http://www.online-convert.com/" rel="nofollow">http://www.online-convert.com/</a></p>
<p>They do have DICOM listed ... | 377 |
<p>Inspired by another question and due to the fact that some of my filament will face the same problem when I will use them again, I wanted to know if there are proven recipies to get rid of water that has ben incorporated to PLA filament from humidity? One knows the filament had too much exposure to humidity when hea... | <p><strong>The easiest way to freshen up filament is hot air, although there are other options.</strong></p>
<p>There is an optimal melt processing <em>moisture level</em> for every plastic, typically in the range of 0.1-0.2% water content by weight. But the equilibrium moisture content of most plastics in humid air c... | <p>Keep in mind gas ovens produce water when the gas is burned, so it isn't as effective as an electric oven for drying.</p>
<p>Silica desiccant is excellent for drying filament, but you will want at least some of the desiccant beads to be "indicating" type. That is they show a color change when saturated with moistu... | 327 |
<p>I printed a big base for a model, but the corners of the bottom bent up, making the whole base rock when set on a table. Is there a quick fix for a makerbot2 without a heated plate?</p>
| <ul>
<li><p>Consider using a different material. Since you're on a replicator 2 you're probably not printing with ABS (which would be a terrible choice for a large, flat model) but probably with PLA. Perhaps you could try printing with PET(G) instead, which tends to warp even less.</p></li>
<li><p>You could try modifyi... | <p>here are the options:</p>
<ul>
<li>Use brim settings which increase contact surface.</li>
<li>Use some sort of glue. People are using many things including hairspray. I do prefer paper glue stick.</li>
</ul>
| 290 |
<p>Correct me if I'm wrong, but a "build" is a "compile", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involves a language that does not compile, how do you perform nightly bu... | <p>Hmm... I'd define "building" as something like "preparing, packaging and deploying all artifacts of a software system". The compilation to machine code is only one of many steps in the build. Others might be checking out the latest version of the code from scm-system, getting external dependencies, setting configura... | <p>Create a daily tag of your current source control trunk?</p>
| 7,737 |
<p>I'm writing a wizard for an Eclipse RCP application. After doing some processing on a file and taking some user input, I don't want to let the user go back to make changes. At this point they must either accept or reject the changes they are about to make to the system.</p>
<p>What I can't seem to find is a metho... | <p>You can return null from the getPreviousPage() method in your wizard page implementation.</p>
| <p>There is no way to do this using standard JFace wizard APIs. My team accomplished this by writing a custom WizardDialog. We did this on an Eclipse RCP application and not on an eclipse plugin. Disabling the back button is breaking convention, but our business analysts really wanted the functionality.</p>
| 6,787 |
<p>I'm trying to build an assembly with one larger part (about 50 mm x 50 mm), two small parts (about 10 mm x 5 mm) each, and one part that starts with two 2 mm x 2 mm squares that eventually bridge into a sort of flap. The larger part has decent adhesion for ... | <p><em>This is a "No" and "Yes" answer, it depends on the version of Cura you are using!</em></p>
<hr />
<p><strong>No</strong>, there are no options available to set the brim to some of the parts in Ultimaker Cura (at the time of writing this answer, pre Cura 4.5.0). You could however change the sm... | <p>This post is quite old, but I describe how I solved this for anyone has the same problem I had: areas moved by the nozzle as the base of some appendices are too thin and tall.</p>
<p>In Cura 4.8 (I don't know since which version this feature is available) it is possible to add some custom shapes (cubes or cylinders)... | 1,169 |
<p>The bottom of my prints warp/curve upwards, most often at the corners. This is a very slight curve, only about 1-2 mm.</p>
<ul>
<li>I print with a raft all the time.</li>
<li>I don't have a heated bed.</li>
<li>I print with PLA at 199 °C (390 °F) with a print speed of approximately 40 mm/s</li>
<li>I have a Sindoh 3... | <p><strong>The first thing to understand is what causes warping</strong>. Warping is caused by the thermal contraction of the plastic when it cools down.</p>
<p>Simplifying things a fair bit, you can visualise the process like this:</p>
<ol>
<li>hot, expanded plastic gets deposited on cooler, shrunk layers,</li>
<li... | <p>If you have a heat bed, heat it up accordingly (for example for PLA 50 °C first layers, 40 °C then can be a good starting point).</p>
<p>If the first layer isn't close enough, then warping can happen (Happened to me when moving from 0.3 mm layers to 0.1 mm).</p>
<p>If you are under extruding / have dirt in the syste... | 781 |
<p>How do I make an MD5 hash of a string with Delphi?</p>
| <p>If you want an MD5 digest and have the <a href="http://www.indyproject.org" rel="nofollow noreferrer">Indy</a> components installed, you can do this:</p>
<pre><code>uses SysUtils, IdGlobal, IdHash, IdHashMessageDigest;
with TIdHashMessageDigest5.Create do
try
Result := TIdHash128.AsHex(HashValue('Hello, world'... | <p>Using ICS, you simply call StrMD5 function which is located in OverbytecsMD5 unit.</p>
<p>Beside that specific function, there are a lot more MD5 function for other datatypes and scenarios. There are also other hash methods such as SHA.</p>
| 8,302 |
<p>How would one create an iterative function (or iterator object) in python?</p>
| <p>Iterator objects in python conform to the iterator protocol, which basically means they provide two methods: <code>__iter__()</code> and <code>__next__()</code>. </p>
<ul>
<li><p>The <code>__iter__</code> returns the iterator object and is implicitly called
at the start of loops.</p></li>
<li><p>The <code>__next... | <blockquote>
<pre class="lang-py prettyprint-override"><code>class uc_iter():
def __init__(self):
self.value = 0
def __iter__(self):
return self
def __next__(self):
next_value = self.value
self.value += 2
return next_value
</code></pre>
</blockquote>
<p>Improving prev... | 3,964 |
<p>Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code (<em>i.e.</em> without using javascript trickery to submit a f... | <p>Asp.net Postbacks are initiated from the client (typically form submission). I am not sure what you are trying to achieve. Some of the server side <a href="http://www.15seconds.com/issue/020102.htm" rel="noreferrer">page lifecyle</a> events are already executed and what you are trying to do is raise the previous eve... | <p>For those using newer versions of .NET, you have to use <code>Page.ClientScript.GetPostBackEventReference</code> since <code>'this.GetPostBackEventReference(...)'</code> is obsolete. Also probably <code>Page.ClientScript.RegisterStartupScript(...</code></p>
| 8,559 |
<p>A while ago, I created some simple command buttons in Octoprint to help with bed levelling, by hopping to particular points on the bed. I realised that what I actually want to do is move Z up 10mm, move, and then home Z though, to avoid ploughing the nozzle along the bed if the level is badly off.</p>
<p>So I did t... | <p>NO if you want to smooth your print, gently heat the plastic and with a utensil smooth out the plastic. A hair dryer is a good way of doing this but be careful to only lightly melt the outside of the model.</p>
| <p>Nail polish contains acetone. It melts PLA, so yes you <em>could</em> damage it. Google acetone vapor batch to read up on a safer way to do the job.</p>
| 700 |
<p>I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.</p>
<p>Here's what the command line looks like:</p>
<pre><code>test.cmd admin P@55w0rd > test-log.txt
</code></pre>
| <p>Another useful tip is to use <code>%*</code> to mean "all". For example:</p>
<pre><code>echo off
set arg1=%1
set arg2=%2
shift
shift
fake-command /u %arg1% /p %arg2% %*
</code></pre>
<p>When you run:</p>
<pre><code>test-command admin password foo bar
</code></pre>
<p>The above batch file will run:</p>
<pre... | <p>If you're worried about security/password theft (that led you to design this solution that takes login credentials at execution instead of static hard coding without the need for a database), then you could store the api or half the code of password decryption or decryption key in the program file, so at run time, u... | 4,610 |
<p>What's the best way to get user input in a C program where the choices are of a limited number?</p>
<p>Say for example the choices are:</p>
<p>A) Print the list.
B) Add 99 to the end of the list.
C) Delete all duplicates.
5) Reset 5 times.</p>
<p>Entering "A" and then Enter is OK.
Or, just a single keystro... | <p><code>getchar()</code>, or <code>cgetc()</code>, depending on the platform</p>
| <p>I have used something simple like the following:</p>
<pre><code>int intput()
{
char input = 0;
int ret_val = 0;
read(0, &input, 1);
switch(input) {
case 'c':
// Do c
break;
case 'p':
// Do p
break;
case 'd':
/... | 6,424 |
<p>Is there a tag in HTML that will only display its content if JavaScript is enabled? I know <code><noscript></code> works the opposite way around, displaying its HTML content when JavaScript is turned off. But I would like to only display a form on a site if JavaScript is available, telling them why they can't ... | <p>Easiest way I can think of:</p>
<pre><code><html>
<head>
<noscript><style> .jsonly { display: none } </style></noscript>
</head>
<body>
<p class="jsonly">You are a JavaScript User!</p>
</body>
</html>
</code></pre>
<p>No document.writ... | <p><a href="http://weblogs.asp.net/alex_papadimoulis/archive/2008/02/21/scriptonly-the-opposite-of-a-noscript.aspx" rel="nofollow noreferrer">Alex's article</a> springs to mind here, however it's only applicable if you're using ASP.NET - it could be emulated in JavaScript however but again you'd have to use document.wr... | 5,023 |
<p>In an application that I am currently working on, a requirement is to bring a window of an external application to the foreground. Making Win32 API calls such as BringWindowToTop and SetForeground window do not work all the time. This is due to some restrictions within Windows XP. What I would like to do instead ... | <p>Check out the section "How to steal focus on 2K/XP" at <a href="http://www.codeproject.com/KB/dialog/dlgboxtricks.aspx" rel="noreferrer">http://www.codeproject.com/KB/dialog/dlgboxtricks.aspx</a>, as this is exactly what you need. I wouldn't go the taskbar route as the taskbar could be hidden or simply not there.</p... | <p>I used this in a program where I needed to simulate clicks and mouse movements; </p>
<p><a href="http://www.codeproject.com/KB/system/globalmousekeyboardlib.aspx" rel="nofollow noreferrer">Global Mouse and Keyboard Library</a></p>
| 3,907 |
<p>I'm currently experimenting with build script, and since I have an ASP.net Web Part under source control, my build script should do that at the end:</p>
<ol>
<li>Grab the "naked" Windows 2003 IIS VMWare or Virtual PC Image from the Network</li>
<li>Boot it up</li>
<li>Copy the Files from the Build Folder to the Ser... | <p>With VMWare, there is the <a href="http://www.vmware.com/support/developer/vix-api/" rel="noreferrer">Virtual Machine Automation APIs (VIX API)</a>. You can find the reference guide <a href="http://pubs.vmware.com/vix-api/ReferenceGuide/" rel="noreferrer">here</a>. It works with VMWare Server and WorkStation, but ... | <p>VirtualBox also has API's for automating their VM's.</p>
| 2,671 |
<p>I'm using TortoiseSVN against the SourceForge SVN repository. I'd like to move a file from one folder to another in order to maintain its revision history. Is this possible? If so, how do you do it?</p>
<p>(My current strategy has been to copy the file into the new folder and check it in and then delete the file fr... | <p>Subversion has native support for moving files.</p>
<pre><code>svn move SOURCE DESTINATION
</code></pre>
<p>See the online help (svn help move) for more information.</p>
| <p>If you are moving folders via Repository Browser, then there is no Move option on right-click; the only way is to drag and drop. </p>
| 6,811 |
<p>I'm using XPath in .NET to parse an XML document, along the lines of:</p>
<pre class="lang-cs prettyprint-override"><code>XmlNodeList lotsOStuff = doc.SelectNodes("//stuff");
foreach (XmlNode stuff in lotsOStuff) {
XmlNode stuffChild = stuff.SelectSingleNode("//stuffChild");
// ... etc
}
</code></pre>
<p>Th... | <p><code>//</code> at the beginning of an XPath expression starts from the document root. Try ".//stuffChild". . is shorthand for self::node(), which will set the context for the search, and // is shorthand for the descendant axis.</p>
<p>So you have:</p>
<pre><code>XmlNode stuffChild = stuff.SelectSingleNode(".//s... | <p>Selecting single node means you need only the first element. So, the best solution is:</p>
<pre><code>XmlNode stuffChild = stuff.SelectSingleNode("descendant::stuffChild[1]");
</code></pre>
| 4,639 |
<p>We should do some tag maintenance, especially regarding printers to make them easier to read. Use an answer to propose a change, merge or split. Discussions for each change should go into the comments of each change.</p>
<p>Some things are easier than others: </p>
<ul>
<li><strong>Renaming</strong> a tag can be do... | <h1>Laundry list:</h1>
<h2>Open</h2>
<ul>
<li><a href="https://3dprinting.meta.stackexchange.com/a/438">e3d</a></li>
<li><a href="https://3dprinting.meta.stackexchange.com/a/436">Creality</a></li>
<li><a href="https://3dprinting.meta.stackexchange.com/a/434">Filled PLA</a></li>
</ul>
<h2>Done</h2>
<ul>
<li><a href=... | <h1>Manufacturer: Monoprice</h1>
<p>Status: <strong>Done</strong></p>
<p>This tag (<a href="https://3dprinting.stackexchange.com/questions/tagged/monprice" class="post-tag" title="show questions tagged 'monprice'" rel="tag">monprice</a>) is used for tagging questions regarding various printer types while the ta... | 70 |
<p>I had recently purchased an ender 3 and after setting it up and plugging it in, I received an electrical shock from the power supply. I live in the UK and so I was provided an EU to UK adapter which I used and I set the voltage to 230 V.</p>
<p>Does anyone know why I was shocked and if there is any solution? W... | <p>You need to take particular care when using plug adaptors - they are not always made to a high standard, and it is possible that the earth connection is not present. If you suspect that the earth connection won't allow a 13 A fuse to blow, it would be good to destroy the adaptor.</p>
<p>A simple cable (without adap... | <p>Sorry for leaving this so late, I completely forgot about my account until I went through some old emails. In terms of the PSU shock issue, it was fixed through a replacement 13 A cable from an old monitor (so @Green Online and @Sean Houlihane's response worked best I think).</p>
| 1,023 |
<p>I've just printed my very first part and it did not want to come loose from the build plate, it fact, it just broke instead.</p>
<p>I can heat the bed up again and work it off, but I wondered if a release agent would be better?</p>
<p>I have a silicon release spray (like those use with molds). Could I spray the b... | <p>Advice from another source suggested thoroughly cleaning the feed gear on the bowden extruder. When I looked closely there were plastic flakes all over the mechanism. I used compressed air and a brush to clean it.
I also discovered expert mode in the FlashPrint software, which enabled me to slow down the speed at... | <p>I had a lot of thumps lately after I moved my printer location.</p>
<p>Turns out my printer wasn't level and the extruder was pushing harder (further down) on different places, causing thumps.
This really shows because the calibration is only in 1 spot.</p>
<p>I used some printer paper and a bubble level then reca... | 1,134 |
<p>I got into a mini-argument with my boss recently regarding "project failure." After three years, our project to migrate a codebase to a new platform (a project I was on for 1.5 years, but my team lead was on for only a few months) went live. He, along with senior management of both my company and the client (I'm one... | <p>I think, most of the time, we developers forget this we all do is, after all, about bussiness.</p>
<p>From that point of view a project is not a failure while the client is willing to pay for it. It all depends on the client, some clients have more patience and understand better the risks of software development, o... | <p>I suppose how successful the project is depends on who the client is. If the client were the company directors and they are happy, then the project was successful regardless of the failures along the way.</p>
| 5,791 |
<p>Can someone show me how to implement a recursive lambda expression to traverse a tree structure in C#. </p>
| <p>Ok, I found some free time finally.<br>
Here we go: </p>
<pre><code>class TreeNode
{
public string Value { get; set;}
public List<TreeNode> Nodes { get; set;}
public TreeNode()
{
Nodes = new List<TreeNode>();
}
}
Action<TreeNode> traverse = null;
traverse = (n) =&g... | <p>Assuming a mythical object TreeItem, that conatins a Children collection to represent your hierarchy.</p>
<pre><code> public void HandleTreeItems(Action<TreeItem> item, TreeItem parent)
{
if (parent.Children.Count > 0)
{
foreach (TreeItem ti in parent.Children)
... | 8,625 |
<p>I was looking for some advice on which 3D printers are good for someone who is just getting into 3D printing?</p>
<p>I have been looking at the Anet A8 on ebay but not sure if they are any good or not.</p>
<p>Regards</p>
| <p>A budget would make answering your question alot easier. Do you have any experience with cad/cam software? What are you wanting to do with it? There are many inexpensive 3d printers but your skill level in mechanics/machinery, electronics, programming etc will also help others choose a good option for you. For examp... | <p>Short answer:</p>
<p>Anet A8 in Ebay will be probably a kit "do it yourself". Something not easy for starters.</p>
<p>I suggest you buy a cheap and ready to use one. A rebrand of Malyan M200 (Monoprice select mini in U.S., Prima Creator in Europe) or something similar.</p>
<p><strong>Long answer:</strong></p>
<p... | 669 |
<p>What's the DOS FINDSTR equivalent for <a href="http://en.wikipedia.org/wiki/Windows_PowerShell" rel="noreferrer">PowerShell</a>? I need to search a bunch of log files for "ERROR".</p>
| <p>Here's the quick answer </p>
<pre><code>Get-ChildItem -Recurse -Include *.log | select-string ERROR
</code></pre>
<p>I found it <a href="http://www.interact-sw.co.uk/iangblog/2006/06/03/pshfindstr" rel="noreferrer">here</a> which has a great indepth answer!</p>
| <pre><code>if ($entry.EntryType -eq "Error")
</code></pre>
<p>Being Object Oriented, you want to test the property in question with one of the standard comparison operators you can find <a href="http://www.computerperformance.co.uk/powershell/powershell_syntax.htm#Operators_" rel="nofollow noreferrer">here</a>.</p>
<... | 3,550 |
<p>I'm writing a LINQ to SQL statement, and I'm after the standard syntax for a normal inner join with an <code>ON</code> clause in C#.</p>
<p>How do you represent the following in LINQ to SQL:</p>
<pre><code>select DealerContact.*
from Dealer
inner join DealerContact on Dealer.DealerID = DealerContact.DealerID
</co... | <p>It goes something like:</p>
<pre><code>from t1 in db.Table1
join t2 in db.Table2 on t1.field equals t2.field
select new { t1.field2, t2.field3}
</code></pre>
<p>It would be nice to have sensible names and fields for your tables for a better example. :)</p>
<p><strong>Update</strong></p>
<p>I think for your query... | <p>One Best example</p>
<p>Table Names : <code>TBL_Emp</code> and <code>TBL_Dep</code></p>
<pre><code>var result = from emp in TBL_Emp join dep in TBL_Dep on emp.id=dep.id
select new
{
emp.Name;
emp.Address
dep.Department_Name
}
foreach(char item in result)
{ // to do}
</code></pre>
| 5,798 |
<p>I'm using Microsoft AjaxControlToolkit for modal popup window.</p>
<p>And on a modal popup window, when a postback occurred, the window was closing. How do I prevent from the closing action of the modal popup?</p>
| <p>Put you controls inside the update panel. Please see my sample code, pnlControls is control that holds controls that will be displayed on popup:</p>
<pre><code><asp:Panel ID="pnlControls" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
... | <p>Like you prolly already know, the modal popup is clientside only, yeah you can gather informations in it during the postback, but if you do a postback he will hide 100% of the time. </p>
<p>Of course, like other proposed, you can do a .show during the postback, but it depends on what you need to do.</p>
<p>Actuall... | 6,320 |
<p>We've got an interesting case where we are trying to determine how different instances of our app were launched. Is there any way for .NET to be able to query another running instance and get the command line parameters passed to that instance? I've not been able to find any way to do it in .NET so far, so I thought... | <p>You can retrieve this information through WMI.</p>
<p>See the <a href="http://msdn.microsoft.com/en-us/library/aa394372.aspx" rel="nofollow noreferrer">Win32_Process</a> class, in particular its command line property. This <a href="http://www.codeproject.com/KB/cs/EverythingInWmi02.aspx" rel="nofollow noreferrer">... | <p>For future reference, here is a code snippet from how I got it to work. This was just for a test to see how it all worked. The actual implemented code parses the command line parameters for what we need.</p>
<pre><code>try
{
ManagementScope connectScope = new ManagementScope();
connectScope.Path = new Managem... | 6,597 |
<p>OK, this kind of follows on from <a href="https://stackoverflow.com/questions/27758/notify-developer-of-a-do-not-use-method">my previous question</a>.</p>
<p>What I would really like to do is create some sort of attribute which allows me to decorate a method that will <strong>break the build</strong>. Much like the... | <p>If this is for XML serialization and NHibernate, where you want the parameterless constructor to be accessible (as is the case in the <a href="https://stackoverflow.com/questions/27758/notify-developer-of-a-do-not-use-method#27796">example</a> you referenced), then use a private or protected parameterless constructo... | <p>Why not just make something up? An unknown attribute would surely break the build.</p>
<pre><code>[MyMadeUpAttributeThatBreaksTheBuildForSure]
public class NotDoneYet {}
</code></pre>
| 4,779 |
<p>I have a setup project created by Visual Studio 2005, and consists of both a C# .NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way -
When the Setup.... | <p>I had LOTS of issues with developing installers (and software in general) for terminal server. I hate that damn thing.</p>
<p>Anyway, VS Setup Projects are just .msi files, and run using the Windows installer framework.</p>
<p>This will drop a log file when it errors out, they're called MSIc183.LOG (swap the c183 ... | <p>Before installing, drop to a command prompt and type</p>
<pre><code>CHANGE USER /INSTALL
</code></pre>
<p>Then install your software. Once the install has completed, drop back to the command prompt and type:</p>
<pre><code>CHANGE USER /EXECUTE
</code></pre>
<p>Alternatively, don't start the installation by a dou... | 3,589 |
<p>I have been writing Flex applications for a few months now and luckily have not needed a full debugger as of yet, so far I have just used a few Alert boxes...</p>
<p>Is there an available debugger that is included in the free Flex SDK? I am not using FlexBuilder (I have been using Emacs and compiling with ant).</p>... | <p>A debugger called <code>fdb</code> is included in the Flex SDK. Here's some documentation on how to use it:</p>
<ul>
<li><a href="http://www.adobe.com/devnet/flex/articles/client_debug_08.html" rel="nofollow noreferrer">Adobe DevCenter: Debugging Client-Side Code in Flex Applications</a></li>
<li><a href="http://li... | <p>I had the same problem when programming with ActionScript and having to test it on a browser. Try <a href="http://www.flex888.com/649/debugging-flex-with-thunderbolt.html" rel="nofollow noreferrer">this</a>. It involves using Firefox (which I believe you do) and FireBug to receive the debug messages.</p>
| 8,070 |
<p>I am working on a robotics project and need to print some gears. These will probably by under a LOT of pressure. Which material/filament should I choose so that the gears don't wear off easily?</p>
<p>PS: Newbie here...</p>
<p><strong>EDIT:</strong>
According to my instuctor, it has to be some sort of plastic (not... | <p>So, as you say you want to materials for printing robotics parts. And as you have not given any budget constraint, I would give you a list of materials which would help you achieve the task, and you can choose amongst them accordingly.</p>
<ol>
<li>Plastics: Basically used for building prototypes. Nylon Polyamide s... | <p>Filaments that are intended for making parts that require strange should be rated by the manufacturer for strength and flexibility.</p>
<p>You need to calculate the required strength and then choose a material with higher rating</p>
<p>For example the rating for filaments made by Taulman are at <a href="http://www... | 116 |
<p>I've just created a new Windows XP VM on my Mac using VMware Fusion. The VM is using NAT to share the host's internet connection.</p>
<p>How do I access a Rails application, which is accessible on the Mac itself using <code>http://localhost:3000</code>?</p>
| <p>On the XP machine, find your IP address by going to the command prompt and typing <code>ipconfig</code>. Try replacing the last number with 1 or 2. For example, if your IP address is 192.168.78.128, use <a href="http://192.168.78.1:3000" rel="noreferrer">http://192.168.78.1:3000</a>.</p>
| <ol>
<li>On the XP machine, Start -> Connect To -> Show all connections.</li>
<li>Double click Local Area Connection.</li>
<li>Click the Support tab.</li>
<li>Take the Default Gateway IP <code><gateway-ip</code>> and hit http://<code><gateway-ip</code>>:3000 in your browser.</li>
</ol>
<p>Gotcha: You must have h... | 8,669 |
<p>I want to do what myopenid does -- once you've logged, you can click a button that generates you an SSL certificate; the browser then downloads this certificate and stores it. When you later go back to yourid.myopenid.com, your browser can use its stored certificate for authentication so you don't ever need a passw... | <p>These are usually referred to as client side certificates.</p>
<p>I've not actually used it but a modified version of restful-authentication can be found here <a href="http://github.com/labria/restful-authentication/tree/master" rel="noreferrer">here</a> that looks like what your after.</p>
<p>I found this via <a ... | <p>I've been working on a solution to this problem. I wanted to do the same thing and I know lots of other website owners want this feature, with or without a third party provider. </p>
<p>I created the necessary server setup and a firefox plugin to handle the certificate-based authentication. Go to mypassfree.com ... | 4,822 |
<p>I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using <code>syncdb</code> to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework).
I was already thin... | <p>Manually doing the SQL changes and dump/reload are both options, but you may also want to check out some of the schema-evolution packages for Django. The most mature options are <a href="http://code.google.com/p/django-evolution/" rel="noreferrer">django-evolution</a> and <a href="http://south.aeracode.org/" rel="n... | <p>I've been using django-evolution. Caveats include: </p>
<ul>
<li>Its automatic suggestions have been uniformly rotten; and</li>
<li>Its fingerprint function returns different values for the same database on different platforms. </li>
</ul>
<p>That said, I find the custom <code>schema_evolution.py</code> approach h... | 5,661 |
<p>I have a large application (~50 modules) using a structure similar to the following:</p>
<ul>
<li>Application
<ul>
<li>Communication modules
<ul>
<li>Color communication module</li>
<li>SSN communication module</li>
<li>etc. communication module</li>
</ul></li>
<li>Router module</li>
<li>Service modules
<ul>
<... | <p>We have a largish application (160+ OSGi bundles where each bundle is a Maven module) and the lesson we learned, and continue to learn, is that flat is better. The problem with encoding semantics in your hierarchy is that you lose flexibility. A module that is 100% say "communication" today may be partly "service" t... | <p>I think you're better off flattening your directory structure. Perhaps you want to come up with a naming convention for the directories such that they sort nicely when viewing all of the projects, but ultimately I don't think all of that extra hierarchy is necessary.</p>
<p>Assuming you're using Eclipse as your ID... | 4,034 |
<p>I'm trying to write a small class library for a C++ course.</p>
<p>I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really progra... | <p>C++ classes work fine in .so shared libraries (they also work in non-MFC DLLs on Windows, but that's not really your question). It's actually easier than Windows, because you don't have to explicitly export any symbols from the libraries.</p>
<p>This document will answer most of your questions: <a href="http://peo... | <p>As I understand it, this is fine so long as you are linking .so files which were all compiled using the same compiler. Different compilers mangle the symbols in different ways and will fail to link.</p>
<p>That is one of the advantages in using COM on Windows, it defines a standard for putting OOP objects in DLLs. ... | 8,251 |
<p>I have what I thought would be a simple question.</p>
<p>I don't have an auto leveling probe, I do my leveling manually with 4 screws and a piece of paper (I measured the thickness to 0.1 mm).</p>
<p>For the longest time I would have trouble with the first layer, sometimes having to give the bed screws a quar... | <p>It is preferred to get the distance correct by hardware changes (leveling screws). But it is possible to do it with software. You can not only change the Z offset in the slicer or in the configuration of Marlin, but also with G-code commands. </p>
<p>The "paper drag" method is perfect for determining the correct Z ... | <p>You don't! Level the bed such that you know the nozzle is above the bed. Stop the print. Disable the steppers. Let it all cool down. Tram the bed (or what you call level). Then start the print again. It doesn't matter what first layer height your slicer thinks it is. All that matters is that it sticks and doesn't el... | 1,074 |
<p>Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like:</p>
<pre><code>Process.Start("Sample.xls");
</code></pre>
<p>However, I need to pass some command line arguments as well. I c... | <p>Using my code from <a href="https://stackoverflow.com/questions/24954/windows-list-and-launch-applications-associated-with-an-extension#24974">this</a> answer you can get command associated with xls extension. Then you can pass this command to <code>Process.Start</code> method.</p>
| <p>If you query the registry, you can retrieve the data about the registered file type and then call the app directly passing the command line arguments. See <a href="http://www.blackwasp.co.uk/ProgrammaticFileTypes.aspx" rel="nofollow noreferrer">Programmatically Checking and Setting File Types</a> for an example of ... | 5,651 |
<p>Unfortunately and regrettably.</p>
<p>Whilst trying to install and fit an SKR Turbo 1.4 Turbo Motherboard into 3D printer body, I managed to break the SKR 1.4 Turbo Motherboard SD-card reader. The card reader is not flush and protrudes from the board. It peeled the reader from the PCB.</p>
<p>I attempted to fix it w... | <p>"Completely" is always relative, but for water at the pressures involved it's probably achievable. Normally you need some sort of <em>gasket</em> (material that can bend/compress to slight imperfections in the mating surfaces), and a means of holding the two surfaces tight against the gasket, to get such a... | <p>I know this sounds obvious, but given the box has holes in the top – does it only need to be watertight when it's the right way up? If not, you could just do something like:</p>
<p><a href="https://i.stack.imgur.com/JXft9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JXft9.jpg" alt="enter image... | 1,766 |
<p>I have a <a href="https://www.monoprice.uk/products/monoprice-maker-ultimate-3d-printer-uk" rel="nofollow noreferrer">Monoprice Maker Ultimate 3D Printer</a> and have tried to replace the nozzle.</p>
<p>The nozzles I bought turned out to be too small.</p>
<p><img src="https://i.imgur.com/iYnMTVf.jpg" alt="Imgur"><... | <h2>What part fits?</h2>
<p>A replacement nozzle needs to fit 3 parameters:</p>
<ul>
<li>Thread diameter and pitch need to match up, to allow mounting</li>
<li>Thread length should be close to the original to allow secure fastening</li>
<li>The style needs to fit: there are quite some styles of nozzle - most are not li... | <h2>What part fits?</h2>
<p>A replacement nozzle needs to fit 3 parameters:</p>
<ul>
<li>Thread diameter and pitch need to match up, to allow mounting</li>
<li>Thread length should be close to the original to allow secure fastening</li>
<li>The style needs to fit: there are quite some styles of nozzle - most are not li... | 1,196 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.