instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I'm using VS2008 SP1 - don't know if this would have happened before I applied SP1 as I never tried it before yesterday. I attempted to debug a fairly simple XSLT file using VS2008 SP1 and got this crash from VS2008 SP1:</p>
<hr>
<h2>Microsoft Visual Studio</h2>
<p>Unexpected error encountered. It is recommended ... | <p>We have reproduced this issue and will fix it in the next release of Visual Studio.</p>
<p>You are welcome to use <a href="http://connect.microsoft.com/" rel="nofollow noreferrer">Microsoft Connect</a> site for reporting any issues related to Visual Studio.</p>
<p>Best regards,<br/>
Anton Lapounov<br/>
Data Progra... | <p>The same problem, after the stylesheet finishes processing, I get Unspecified error (and eveything seems ok after closing the error message box). Selecting source control plugin to "None" in VS options gets rid of the problem. </p>
| 3,342 |
<p>I have an activity that has a TabHost containing a set of TabSpecs each with a listview containing the items to be displayed by the tab. When each TabSpec is created, I set an icon to be displayed in the tab header.</p>
<p>The TabSpecs are created in this way within a <code>setupTabs()</code> method which loops to c... | <p>The short answer is, you're not missing anything. The Android SDK doesn't provide a direct method to change the indicator of a <code>TabHost</code> after it's been created. The <code>TabSpec</code> is only used to build the tab, so changing the <code>TabSpec</code> after the fact will have no effect.</p>
<p>I thi... | <p>Try This:</p>
<pre><code>tabHost.setOnTabChangedListener(new OnTabChangeListener() {
public void onTabChanged(String tabId) {
if (TAB_MAP.equals(tabId)) {
ImageView iv = (ImageView) tabHost.getTabWidget().getChildAt(0).findViewById(android.R.id.icon);
iv.setImageDrawable(getResou... | 5,748 |
<p>I have a home built RepRap with all sides open..</p>
<p>Would there be any advantage to enclosing the print area in acrylic?</p>
| <p>It is hard to tell whether you personally should enclose your printer. However, you asked for the advantages and I will name some of them on which one can base a decision.</p>
<p>A 3D printer enclosure</p>
<ul>
<li>helps to keep the temperature of the whole print at controlled levels, if you use a heating element,... | <p>If you will be printing PLA, <strong>no</strong>, or at least not without active cooling of the chamber. PLA's glass transition temperature is sufficiently low that the ambient temperature matters a lot to whether layer N can cool enough before layer N+1 is laid, in order to have a firm surface to extrude against an... | 310 |
<p>Our dev shop currently uses Visual SourceSafe. We all know how that could end up (badly), so we're investigating other systems. First up is Perforce. Does anyone have experience with using it and its integration into Visual Studio (2003/2005/2008)? Is it as good as any other, or is it pretty solid with good features... | <p>I used Perforce at my last 3 jobs (my current job I'm using Subversion, which I don't like nearly as much.) I'm a big fan of Perforce, and moving from SourceSafe it will seem like Nirvana. Just getting atomic checkin will be a big boost for your company. Otherwise, Perforce is fast, it has good tools, and the workfl... | <p>I haven't used Perforce, but I have found moving to Team Foundation Server as one of the best options while working with Visual Studio.</p>
| 4,634 |
<p>Anyone doing any work using "offline" forms? We have an application that requires inputting data from outside our company. I was thinking about sending a form out via email, allowing the form to be filled out then sent back. Obviously a web application would be the best solution, but management doesn't seem ready... | <p>Have you considered InfoPath? These can be created and distributed through email. And then the data can be collated automatically.</p>
<p>Also, consider using Google Spreadsheets with Google Forms. It's free and infrastructure is outsourced.</p>
<p>PDF forms can work as well.</p>
| <p>Another possibility is to use <a href="http://www.microsoft.com/Sharepoint/default.mspx" rel="nofollow noreferrer">Microsoft SharePoint</a>. If your company uses Microsoft Office for the people filling the forms you referring to, you could deploy an Office based solution and gather information with <a href="http://w... | 4,065 |
<p>I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on Rails?</p>
<p>Edit: The answer below is corr... | <p>From <a href="http://coderrr.wordpress.com/2008/05/28/get-your-local-ip-address/" rel="noreferrer">coderrr.wordpress.com</a>:</p>
<pre><code>require 'socket'
def local_ip
orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily
UDPSocket.open do |s... | <p>try: <a href="http://apidock.com/rails/v2.3.8/ActionController/Request/remote_ip" rel="nofollow noreferrer">Request.remote_ip</a></p>
<blockquote>
<p>remote_ip()</p>
<p>Determine originating IP address. REMOTE_ADDR is the standard but will
fail if the user is behind a proxy. HTTP_CLIENT_IP and/or
HTTP_X_... | 6,411 |
<p>From what I've seen the tag is ignored when hosting a WCF service in IIS. I understand that when self-hosting this is required but is this harmful or even used when operating under IIS?</p>
<p>ex.</p>
<pre><code><system.serviceModel>
<service blah blah blah>
<host>
<baseAddresses... | <p>As you have guessed, the baseAddresses element is completely ignored when hosting in IIS. The service's base address is determined by the web site & virtual directory into which your wcf service is placed.</p>
<p>Even when self-hosting, baseAddresses is not required. It is merely a convenience that avoids you ... | <p>base address required for selfhosting. IIS/WAS hosts ignores the base address.</p>
| 8,013 |
<p>Each time a python file is imported that contains a large quantity of static regular expressions, cpu cycles are spent compiling the strings into their representative state machines in memory.</p>
<pre><code>a = re.compile("a.*b")
b = re.compile("c.*d")
...
</code></pre>
<p>Question: Is it possible to store these ... | <blockquote>
<p>Is it possible to store these regular expressions in a cache on disk in a pre-compiled manner to avoid having to execute the regex compilations on each import?</p>
</blockquote>
<p>Not easily. You'd have to write a custom serializer that hooks into the C <code>sre</code> implementation of the Python ... | <p>The <a href="http://docs.python.org/lib/module-shelve.html" rel="nofollow noreferrer">shelve</a> module appears to work just fine:</p>
<pre><code>
import re
import shelve
a_pattern = "a.*b"
b_pattern = "c.*d"
a = re.compile(a_pattern)
b = re.compile(b_pattern)
x = shelve.open('re_cache')
x[a_pattern] = a
x[b_patte... | 9,103 |
<p>I have a Wanhao Duplicator i3 v2 (A.K.A. Maker Select, Cocoon Create).</p>
<p>My extruder got clogged: I noticed that it wasn't extruding, so I stopped my print, removed the fan, heatsink and the extruder motor and I saw that the clog is at the heater block level.</p>
<p>This is a what I have:</p>
<p><a href="htt... | <p>I'm sure this is not the best solution, and if you have some ethyl acetate you should try that before going "the hard way".</p>
<p>Ethyl acetate is a solvent for PLA, so if you soak the extruder into it PLA should melt and free the extruder.</p>
<p>That said, this is the "hard" solution that worked for me.</p>
<h... | <p>Steps:</p>
<ol>
<li>Take the tip off, assuming it has a tip.</li>
<li>Heat up the extruder.</li>
<li>Take a length of plastic and push it though the extruder.</li>
<li>If the tip is clogged, then take a micro hand drill to clear the blockage.</li>
</ol>
| 502 |
<p>I want to create two piece labels for storage containers. The main piece would be the “badge” which would have text cut out of it (e.g. “Paint”, “Electrical” etc.). The second piece would be a positive of the text which is would be in a different colour, and would fit inside the cut out on the badge. Because of the ... | <p>In OpenSCAD, apply the <code>offset</code> transformation to inset the letter outlines before extruding them. However you may find it works better to fill the sunken letter shapes with nail polish then remove the overflow with acetone; see my question & answer <a href="https://3dprinting.stackexchange.com/a/1087... | <p>You will need to run test prints to see how your printer behaves with your choice of filaments. Then you'll know how much narrower the letter-lines (not the letter dimensions) need to be to fit. </p>
<p>The problem with that is one of making letters with narrow solid parts but without "shrinking" the open parts ... | 1,555 |
<p>I need to flip an image so that a character faces in the right direction. This needs to be done "on the fly' as they say. </p>
<p>The issue I am having is that with Gif images, I seem to lose the transparency. (The background goes white)</p>
<p>Below is the code: (Alternatively someone could send me to a good exam... | <p>Shouldn't this:</p>
<pre><code>imagecolortransparent($img, imagecolorallocate($img, 0, 0, 0));
imagealphablending($img, false);
imagesavealpha($img, true);
</code></pre>
<p>...be this:</p>
<pre><code>imagecolortransparent($temp, imagecolorallocate($img, 0, 0, 0));
imagealphablending($temp, false);
imagesavealpha(... | <p>If you can guarantee the presence of ImageMagick, you can use their <code>mogrify -flop</code> command. It preserves transparency.</p>
| 9,203 |
<p>I have been researching asynchronous messaging, and I like the way it elegantly deals with some problems within certain domains and how it makes domain concepts more explicit. But is it a viable pattern for general domain-driven development (at least in the service/application/controller layer), or is the design ove... | <p>Great question :). The main problem with asynchronous messaging is that when folks use procedural or object oriented languages, working in an asynchronous or event based manner is often quite tricky and complex and hard for the programmer to read & understand. Business logic is often way simpler if its built in ... | <p>I agree with @BradS too BTW</p>
<p>BTW <a href="http://activemq.apache.org/camel/hiding-middleware.html" rel="nofollow noreferrer">here's a way of hiding the middleware from your business logic</a> while still getting the benefits of loose coupling & SEDA - while being able to easily switch between a variety of... | 9,849 |
<p>I would like to open a small video file and map every frames in memory (to apply some custom filter). I don't want to handle the video codec, I would rather let the library handle that for me.</p>
<p>I've tried to use Direct Show with the SampleGrabber filter (using this sample <a href="http://msdn.microsoft.com/en... | <p>Currently these are the most popular video frameworks available on Win32 platforms:</p>
<ol>
<li><p>Video for Windows: old windows framework coming from the age of Win95 but still widely used because it is very simple to use. Unfortunately it supports only AVI files for which the proper VFW codec has been installed... | <p>I would recommend FFMPEG or GStreamer. Try and stay away from openCV unless you plan to utilize some other functionality than just streaming video. The library is a beefy build and a pain to install from source to configure FFMPEG/+GStreamer options.</p>
| 5,880 |
<p>I've tried using a throat with a PTFE tube, but encountered the problem described in this <a href="https://3dprinting.stackexchange.com/questions/904/teflon-tubing-in-nozzle-throat-coming-out">question</a>. It seems only a small amount of excess pressure in the extruder is enough to force out the inner tube. This ma... | <p>In this case I would like to first recommend replacing your PTFE tube with a better quality product. Unfortunately, the quality:price ratio is as to be expected here. My reasoning:</p>
<p>PTFE has great thermal properties for a polymer, just like ABS. In fact, the <a href="https://en.wikipedia.org/wiki/Glass_transi... | <p>I see, you want to Block the tefflon tube from going Up and Out of the extruder. Yes I see no reason why you would not fid a nut cap. Drill a hole and have it work. There is likely a special nut cap with a pre existing hole in it already but I decided the keywords was asking for bad results on a work computer. </p>
... | 471 |
<p>I want to use the <a href="http://msdn.microsoft.com/en-us/library/system.enterpriseservices.internal.publish.gacremove(VS.80).aspx" rel="nofollow noreferrer">Publish.GacRemove</a> function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.</p>
<p>Should it be a path... | <p>I am using the <code>GacInstall</code> to publish my assemblies, however once installed into the gac, I sometimes delete my ‘temporary’ copy of the assemblies.</p>
<p>And then, if I ever wanted to uninstall the assemblies from the gac I do not have the files at the original path. This is causing a problem since I c... | <p>I am not exactly sure about it but I believe GacRemove should do the same thing as gacutil /u. So, it should be the path of your DLL. However it doesn't have to be the same DLL file. Copy of the original should suffice since what counts is the uniqueID of the DLL.</p>
| 6,772 |
<p>I've found SVN to be extremely useful for documentation, personal files, among other non-source code uses.
What other practical uses have you found to version control systems in general?</p>
| <p>I've seen version control being used for other non-source code purposes, like,</p>
<ol>
<li>Schema files - a set of XML schema files that represent a real world schema</li>
<li>Content files - content represented in a specific format, this is tied to a designer in VStudio, using source control, allows history, roll... | <p>Yes, I have a doc directory in git. I contains a todo list, a calendar and a few other documents.</p>
| 3,540 |
<p>In college I've had numerous design and <a href="http://en.wikipedia.org/wiki/Unified_Modeling_Language" rel="noreferrer">UML</a> oriented courses, and I recognize that UML can be used to benefit a software project, especially <a href="http://en.wikipedia.org/wiki/Use_case" rel="noreferrer">use-case</a> mapping, but... | <p>In a sufficiently <strong>complex system</strong> there are some places where some <code>UML</code> is considered useful. </p>
<p>The useful diagrams for a system, vary by applicability.<br>
But the most widely used ones are: </p>
<ul>
<li>Class Diagrams</li>
<li>State Diagrams</li>
<li>Activity Diagrams</li>
<li... | <p>UML is just one of methods for communication within people.
Whiteboard is better.</p>
| 3,935 |
<p>I'd like to script, preferably in rake, the following actions into a single command:</p>
<ol>
<li>Get the version of my local git repository.</li>
<li>Git pull the latest code.</li>
<li>Git diff from the version I extracted in step #1 to what is now in my local repository.</li>
</ol>
<p>In other words, I want to g... | <p>You could do this fairly simply with refspecs.</p>
<pre><code>git pull origin
git diff @{1}..
</code></pre>
<p>That will give you a diff of the current branch as it existed before and after the pull. Note that if the pull doesn't actually update the current branch, the diff will give you the wrong results. Another... | <p>If you drop this into your bash profile you'll be able to run grin (git remote incoming) and grout (git remote outgoing) to see diffs of commits that are incoming and outgoing for origin master.</p>
<pre><code>function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/... | 8,610 |
<p>I've trouble setting up Vim (7.1.xxx) for editing Python files (*.py).
Indenting seems to be broken (optimal 4 spaces).
I've followed some tutorials I found via Google. Still no effect :/
Please help.</p>
| <p>I use this on my macbook:</p>
<pre><code>" configure expanding of tabs for various file types
au BufRead,BufNewFile *.py set expandtab
au BufRead,BufNewFile *.c set expandtab
au BufRead,BufNewFile *.h set expandtab
au BufRead,BufNewFile Makefile* set noexpandtab
" --------------------------------------------------... | <p>for more advanced python editing consider installing the <a href="http://eigenclass.org/hiki/simplefold" rel="nofollow noreferrer">simplefold</a> vim plugin. it allows you do advanced code folding using regular expressions. i use it to fold my class and method definitions for faster editing.</p>
| 9,081 |
<p>I am developping a (relatively small) website in ASP.Net 2.0. I am also using nAnt to perform some easy tweaking on my project before delivering executables. In its current state, the website is "precompiled" using </p>
<blockquote>
<p><code>aspnet_compiler.exe -nologo -v ${Appname} -u ${target}</code></p>
</bloc... | <p>Make sure that:</p>
<ol>
<li>You are using a Web Application project rather than a Web Site project, this will result in a precompiled binary for your code behind</li>
<li>You have turned off debug code generation in the web.config file - I guess if this is different to when you used aspnet_compiler the code may be... | <p>@Simon:</p>
<ul>
<li>The project is a Web Application. Websites are then slower to startup (I had no idea it had an incidence, beside the different code organization)?</li>
<li>I checked, and while I edit the web.config after aspnet_compiler is called, I don't touch the debug value (I will however check the website... | 8,027 |
<p>I created a few mediawiki custom tags, using the guide found here</p>
<p><a href="http://www.mediawiki.org/wiki/Manual:Tag_extensions" rel="nofollow noreferrer">http://www.mediawiki.org/wiki/Manual:Tag_extensions</a></p>
<p>I will post my code below, but the problem is after it hits the first custom tag in the pag... | <p>Easy!</p>
<pre><code><xsl:template match="/">
<xsl:apply-templates select="root/node">
<xsl:sort select="position()" data-type="number" order="descending"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="node">
<xsl:value-of select="."/>
&l... | <pre><code><xsl:template match="/">
<xsl:apply-templates select="root/node[3]"/>
<xsl:apply-templates select="root/node[2]"/>
<xsl:apply-templates select="root/node[1]"/>
</xsl:template>
<xsl:template match="node">
<xsl:value-of select="."/&... | 7,247 |
<p>I've always wanted a way to make a socket connection to a server and allow the server to manipulate the page DOM. For example, this could be used in a stock quotes page, so the server can push new quotes as they become available. </p>
<p>I know this is a classic limitation (feature?) of HTTP's request/response pr... | <p>You may want to look at <a href="http://en.wikipedia.org/wiki/Comet_(programming)" rel="nofollow noreferrer">Comet</a> which is a fancy name for a long running HTTP connection where the server can push updates to the page.</p>
| <blockquote>
<p>You may want to look at Comet</p>
</blockquote>
<p>a.k.a. <a href="http://ejohn.org/blog/streaming-http-server-push/" rel="nofollow noreferrer">server push</a>. This does not let the server "update" the client page directly, but all the new data is sent to the page through a single connection.</p>
<... | 3,428 |
<p>We have an InnoDB database that is about 70 GB and we expect it to grow to several hundred GB in the next 2 to 3 years. About 60 % of the data belong to a single table. Currently the database is working quite well as we have a server with 64 GB of RAM, so almost the whole database fits into memory, but we’re concern... | <p>You will definitely start to run into issues on that 42 GB table once it no longer fits in memory. In fact, as soon as it does not fit in memory anymore, performance will degrade extremely quickly. One way to test is to put that table on another machine with less RAM and see how poor it performs.</p>
<blockquote>
... | <p>First of all, it doesn't matter as much splitting out tables unless you also move some of the tables to a separate physical volume. </p>
<p>Secondly, it's not necessarily the table with the largest physical size that you want to move. You may have a much smaller table that gets more activity, while your big table... | 6,788 |
<p>Has anyone come up with a good way of performing full text searches (<code>FREETEXT() CONTAINS()</code>) for any number of arbitrary keywords using standard LinqToSql query syntax?</p>
<p>I'd obviously like to avoid having to use a Stored Proc or have to generate a Dynamic SQL calls.</p>
<p>Obviously I could just ... | <p>Unfortunately LINQ to SQL does not support Full Text Search. </p>
<p>There are a bunch of products out there that I think could: Lucene.NET, NHibernate Search comes to mind. LINQ for NHibernate combined with NHibernate Search would probably give that functionality, but both are still way deep in beta.</p>
| <p>Unfortunately LINQ to SQL does not support Full Text Search. </p>
<p>There are a bunch of products out there that I think could: Lucene.NET, NHibernate Search comes to mind. LINQ for NHibernate combined with NHibernate Search would probably give that functionality, but both are still way deep in beta.</p>
| 9,326 |
<p>So, I'm having this problem where almost anything I print with a section(s) that is not directly connected to something below it breaks when I try to pull the small filaments meant to hold it up during printing off. For example, I 3D-printed a Rayquaza(<a href="https://www.myminifactory.com/object/rayquaza-23624" re... | <p>The small filaments you remove that hold the parts up are called supports. The one model I located on Thingiverse clearly requires a number of supports, as the model is not easily designed for 3d printing with FDM printers. It would be better printed with SLS, but that's not the focus of your question.</p>
<p>You d... | <p>Depends how small your printing, if it's the one i see on thingiverse then it don't see why it would break unless:</p>
<ol>
<li>it's super small</li>
<li>too many or strong support that's hard to pull off?</li>
<li>Not calibrated for the filament - eg temperature too low or too much fan and the layer's aren't prope... | 387 |
<p>I looking for a way, specifically in PHP that I will be guaranteed to always get a unique key.</p>
<p>I have done the following:</p>
<pre><code>strtolower(substr(crypt(time()), 0, 7));
</code></pre>
<p>But I have found that once in a while I end up with a duplicate key (rarely, but often enough).</p>
<p>I have a... | <p>There are only 3 ways to generate unique values, rather they be passwords, user IDs, etc.:</p>
<ol>
<li>Use an effective GUID generator - these are long and cannot be shrunk. If you only use part <strong>you FAIL</strong>. </li>
<li>At least part of the number is sequentially generated off of a single sequence. Y... | <p>I usually do a random substring (randomize how many chars between 8 an 32, or less for user convenience) or the MD5 of some value I have gotten in, or the time, or some combination. For more randomness I do MD5 of come value (say last name) concatenate that with the time, MD5 it again, then take the random substring... | 7,895 |
<p>Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio.</p>
| <p>I'll second the vote for <a href="http://www.telerik.com" rel="nofollow noreferrer">Telerik</a>. Their controls for the most part "just work" and their support has been excellent. I primarily use their forums and I still receive a response within a day (unlike some other vendors who barely seem to notice t... | <p><a href="http://www.componentart.com" rel="nofollow noreferrer">ComponentArt</a> has some pretty cool controls. You might want to check out <a href="http://www.telerik.com" rel="nofollow noreferrer">Telerik</a> as well. Both companies offer pretty easy to use controls that look nice.</p>
| 5,356 |
<p>I want to load a desktop application, via reflection, as a Control inside another application.</p>
<p>The application I'm reflecting is a legacy one - I can't make changes to it.</p>
<p>I can dynamically access the Form, but can't load it as a Control.</p>
<p>In .Net Form expands on Control, and I can assign the ... | <p>Yes, this works just fine. I'm working on a .NET app right now that loads forms into a panel on a host form.</p>
<p>The relevant snippet:</p>
<pre><code>// setup the new form
form.TopLevel = false;
form.FormBorderStyle = FormBorderStyle.None;
form.Dock = DockStyle.Fill;
form.Show ( );
// add to the panel's list o... | <p>You should be able to add the form to the controls collection of your parent form...</p>
<p>See here:
<a href="http://vbcity.com/forums/topic.asp?tid=30539" rel="nofollow noreferrer"><a href="http://vbcity.com/forums/topic.asp?tid=30539" rel="nofollow noreferrer">http://vbcity.com/forums/topic.asp?tid=30539</a></a... | 7,445 |
<p>I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL. </p>
<p>Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?</p>
| <p>No, LINQ to SQL is very much MS SQL only - think of it as a client driver.</p>
<p><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1623471&SiteID=1" rel="noreferrer">Microsoft is/was helping Oracle and DataDirect develop providers for Oracle and other non-MS database servers.</a></p>
| <p>Not an easy way, at least until a good provider is produced.</p>
<p>Really MS should provide at least an OLEDB Linq provider. After all, Linq to Sql is basically an implementation of IQueryable with designer support.</p>
| 5,065 |
<p>I was reading Joel's book where he was suggesting as interview question:</p>
<blockquote>
<p>Write a program to reverse the "ON" bits in a given byte.</p>
</blockquote>
<p>I only can think of a solution using C. </p>
<p>Asking here so you can show me how to do in a Non C way (if possible)</p>
| <blockquote>
<p>What specifically does that question mean?</p>
</blockquote>
<p>Good question. If reversing the "ON" bits means reversing only the bits that are "ON", then you will always get 0, no matter what the input is. If it means reversing <em>all</em> the bits, i.e. changing all 1s to 0s and all 0s to 1s, w... | <p>Since the question asked for a non-C way, here's a Scheme implementation, cheerfully plagiarised from <a href="http://people.csail.mit.edu/jaffer/SLIB" rel="nofollow noreferrer">SLIB</a>:</p>
<pre><code>(define (bit-reverse k n)
(do ((m (if (negative? n) (lognot n) n) (arithmetic-shift m -1))
(k (+ -1 k) (... | 3,113 |
<p>I am printing Eryone 1.75 mm PET on my Kobra Max printer with 80°C bed and 230°C.</p>
<p>I am experiencing this:</p>
<p><a href="https://i.stack.imgur.com/RXv0n.jpg" rel="nofollow noreferrer" title="Possible stringing and over-extrusion"><img src="https://i.stack.imgur.com/RXv0n.jpg" alt="Possible stringing and over... | <p>PETG sticks to brass nozzles <em>really well</em>. Better than it sticks to itself, in many cases. When travelling over already-printed material, especially if the filament is not retracted (Cura calls this kind of travel "combing") or if the material it's travelling over is overextruded and bulging up, th... | <h1>Stringing</h1>
<p>PETG is prone to stringing, even with the best settings. Often, I live with some stringing as strings are easy to clean up while other issues can be introduced by getting totally rid of it.</p>
| 2,208 |
<p>I need to print some items that will go in my car, which sits in direct sun a good portion of the day and almost certainly exceeds 50 °C inside during the summer months (I've had PLA prints sag quite visibly under their own weight and sliding parts weld together, and PETG prints show slight warpage after a couple we... | <p>The glass transition temperature is not always indicative of strength. Some polymers are solid well above that temperature, see <a href="https://omnexus.specialchem.com/polymer-properties/properties/glass-transition-temperature" rel="nofollow noreferrer">https://omnexus.specialchem.com/polymer-properties/properties/... | <p>If there isn't a TDS on the manufacturer's website, you could email them and ask for it. If they won't give it to you, you could ask for the SDS to see if it has any additives. Polymaker has a TDS for every filament they make on their website, so I would recommend their filament for your purposes. I would also sugge... | 1,994 |
<p>When creating the <code>id</code> attributes for HTML elements, what rules are there for the value?</p>
| <p>For <a href="http://www.w3.org/TR/html4/types.html#type-id" rel="noreferrer">HTML 4</a>, the answer is technically:</p>
<blockquote>
<p>ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (... | <p>alphabets → caps & small</p>
<p>digits → 0-9</p>
<p>special characters → ':', '-', '_', '.'</p>
<p>The format should be either starting from '.' or an alphabet, followed by either of the special characters of more alphabets or numbers. The value of the id field must not end at an '_'.</p>
<p>Also, spaces are not... | 9,602 |
<p>I've heard many programmers, particularly Delphi programmers scorn the use of 'with'. </p>
<p>I thought it made programs run faster (only one reference to parent object) and that it was easier to read the code if used sensibly (less than a dozen lines of code and no nesting).</p>
<p>Here's an example:</p>
<pre><... | <p>One annoyance with using with is that the debugger can't handle it. So it makes debugging more difficult.</p>
<p>A bigger problem is that it is less easy to read the code. Especially if the with statement is a bit longer.</p>
<pre><code>procedure TMyForm.ButtonClick(...)
begin
with OtherForm do begin
Left :=... | <p>We've recently banned it in our Delphi coding stnadards. </p>
<p>The pros were frequently outweighing the cons.</p>
<p>That is bugs were being introduced because of its misuse. These didn't justify the savings in time to write or execute the code.</p>
<p>Yes, using with can led to (mildly) faster code execution... | 9,691 |
<p>What is the best way to create a lock on a file in Perl?</p>
<p>Is it best to flock on the file or to create a lock file to place a lock on and check for a lock on the lock file?</p>
| <p>If you end up using flock, here's some code to do it:</p>
<pre><code>use Fcntl ':flock'; # Import LOCK_* constants
# We will use this file path in error messages and function calls.
# Don't type it out more than once in your code. Use a variable.
my $file = '/path/to/some/file';
# Open the file for appending. N... | <p>Use the <a href="http://perldoc.perl.org/functions/flock.html" rel="nofollow noreferrer">flock</a> Luke. </p>
<p><strong>Edit:</strong> <a href="http://www.perlmonks.org/?node_id=7058" rel="nofollow noreferrer">This</a> is a good explanation.</p>
| 5,530 |
<p>How do you generate C# classes for accessing WMI?</p>
| <p>To generate strongly typed WMI classes, use the Management Strongly typed class generator (MgmtClassGen.exe). It's usually in C:\Program Files\Microsoft Visual Studio X\SDK\vX\Bin. The parameters are <a href="http://msdn.microsoft.com/en-us/library/2wkebaxa.aspx" rel="noreferrer">at MSDN</a> and they even have <a ... | <p>You can try WMICodeCreator it generates vbscript jscript vb.net and c# code
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=2cc30a64-ea15-4661-8da4-55bbc145c30e&displaylang=en" rel="nofollow noreferrer">Download WMICodeCreator from Microsoft</a></p>
| 6,627 |
<p>I am using a Flashforge Creator Dual Extrusion 3D Printer with RepG (<a href="http://replicat.org/" rel="nofollow noreferrer">ReplicatorG</a>), and tonight a print completely detached from the build plate.</p>
<p>I reset everything and watched it closely. It is a simple abs print at 230/110 degrees.</p>
<p>A few... | <p>Check your slicer settings. Some slicers allow the temperature to change at a specified layer. You may have programmed the slic3r to turn off the bed after the first (or maybe zeroth) layer.</p>
<p>You call also examine the G-code for M140, M144, and M190 commands.</p>
<p>Of course, the usual intermittent ele... | <p>Preheating the bed is a commonly used approach to shorten the time to print. I'll explain; it actually does not shorten the physical print time itself, but before you start a print there is always stuff to do like inserting the SD-card or loading the model in the print server, while you do that, the bed will be heat... | 973 |
<p>I have seen some lasers attached to the RepRap platform for cutting but most seem to be cutting paper, balsa wood, or merely etching. If I were wanting to build a platform for cutting wood, similar to the wood framed or boxed 3D printers on the market, what power laser would I need for that? I assume that a lower ... | <p>Please do not go down this road. First, not all lasers are equally absorbed by the material and the energy converted to heat to vaporize the material. The light not absorbed is reflected right back into your eyes. This is especially dangerous because it doesn't make you go blind instantly, fooling you into thinking ... | <p>Strapping a laser to a cheap robot made with flammable plastic parts and no enclosure is stupid in the extreme. Don't do it. Seriously, just don't. <strong>RepRaps are not suitable for laser conversions.</strong> </p>
<p>You have to worry about reflected light damaging your eyes, and for the blue diode lasers curre... | 208 |
<p>I'm trying to alpha blend sprites and backgrounds with <a href="http://www.devkitpro.org/" rel="noreferrer">devkitPro</a> (including libnds, libarm, etc).</p>
<p>Does anyone know how to do this?</p>
| <p>As a generic reference, i once wrote <a href="http://sylvainhb.blogspot.com/2006/09/alpha-blending.html" rel="nofollow noreferrer">a small blog entry</a> about that issue. Basically, you first have to define which layer is alpha-blended against which other layer(s). Afaik,</p>
<ul>
<li>the source layer(s) must be o... | <p>It's been a <i>long</i> time since I've done any GBA programming, but as I recall, the DS supports most (if not all) of the stuff that GBA supports. <a href="http://www.coranac.com/tonc/text/gfx.htm" rel="nofollow noreferrer">This</a> link has a section on how to do alpha blending for GBA (section 13.2). I don't kno... | 2,880 |
<p>I apologize if this is in the wrong section, but it seems relevant.</p>
<p>I am an absolute noob at 3D printing, but recently my need for a specific, small part intersected with access to a 3D printer at work (Zortrax M200), so I figured now was a good opportunity to get into printing.</p>
<p>I am designing a clam... | <p>Many printers have a problem with inserting filament into the extruder. Cutting it at an angle is a huge help. It is also very possible that you have a cog or a bad extruder nozzle. </p>
<p>This link could be of some help: <a href="https://www.thingiverse.com/groups/prusa-i3/topic:7469" rel="nofollow noreferrer">Ex... | <p>My first step would be to cut the filament at a bit of an angle. This will help the filament enter the extruder correctly. </p>
<p>If you're still having trouble, you may have a clogged nozzle. This article by Lifewire -<a href="https://www.lifewire.com/3d-printer-extruder-nozzle-clogged-2289" rel="nofollow nore... | 571 |
<p>Let's say I have the following simple enum:</p>
<pre><code>enum Response
{
Yes = 1,
No = 2,
Maybe = 3
}
</code></pre>
<p>How can I bind this enum to a DropDownList control so that the descriptions are displayed in the list as well as retrieve the associated numeric value (1,2,3) once an option has been... | <p>I probably wouldn't <strong>bind</strong> the data as it's an enum, and it won't change after compile time (unless I'm having one of those <em>stoopid</em> moments). </p>
<p>Better just to iterate through the enum: </p>
<pre><code>Dim itemValues As Array = System.Enum.GetValues(GetType(Response))
Dim itemNames A... | <p>This is my solution for Order an Enum and DataBind(Text and Value)to Dropdown using LINQ</p>
<pre><code>var mylist = Enum.GetValues(typeof(MyEnum)).Cast<MyEnum>().ToList<MyEnum>().OrderBy(l => l.ToString());
foreach (MyEnum item in mylist)
ddlDivisao.Items.Add(new ListItem(item.ToString(), ((int)... | 8,728 |
<p>I am looking for some good links with best practices and sample code on creating <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" rel="noreferrer">REST</a>ful web services using .NET. </p>
<p>Also, any other input you might have regarding REST would be greatly appreciated.</p>
| <p><a href="http://msdn.microsoft.com/en-us/magazine/cc748663.aspx?pr=blog" rel="noreferrer">ADO.Net Data Servcies</a> makes it really easy to build and <a href="http://msdn.microsoft.com/en-us/magazine/cc794279.aspx" rel="noreferrer">consume</a> RESTful web services in the .Net world but nevertheless understanding the... | <p>When I began developing REST web services I read REST API Design Rulebook from Mark Masse. Once you know the basics and the theory, you will be able to implement REST with WCF, HTTPListener or ServiceStack. All these frameworks are .NET and quite good documented... </p>
<p>I would recommend to you service stack (ht... | 8,537 |
<p>I'm developing a data access component that will be used in a website that contains a mix of classic ASP and ASP.NET pages, and need a good way to manage its configuration settings.</p>
<p>I'd like to use a custom <code>ConfigurationSection</code>, and for the ASP.NET pages this works great. But when the component... | <p>Try this:</p>
<pre><code>System.Configuration.ConfigurationFileMap fileMap = new ConfigurationFileMap(strConfigPath); //Path to your config file
System.Configuration.Configuration configuration = System.Configuration.ConfigurationManager.OpenMappedMachineConfiguration(fileMap);
</code></pre>
| <p>Use XML processing:</p>
<pre><code>var appPath = AppDomain.CurrentDomain.BaseDirectory;
var configPath = Path.Combine(appPath, baseFileName);;
var root = XElement.Load(configPath);
// can call root.Elements(...)
</code></pre>
| 2,674 |
<p>I am designing a part with a material which can bear up to a certain stress. </p>
<p>To keep the stress within the design limits, I need to ensure a certain surface of solid material per layer, in other words a minimum amount of extruded filament per layer and a smoothly changing infill ratio so that the infill can... | <p>I think you have a major XY problem. The amount of material per layer is not what determines the part strength. Unless additional material is placed in a manner that reinforces against the stress you're designing for, it's just wasted. Moreover, infill in particular is not terribly useful this way, as infill has to ... | <p>Very interesting idea!
There may be a way to do this semi-automatically, but I believe it's not yet a part of any slicer.</p>
<p>My suggestion would be:</p>
<ul>
<li>Export file as .stl (Fusion 360)</li>
<li>Use a DLP slicer to create images of the layers (CHITUBox)</li>
<li>Calculate the area of each of the image... | 1,547 |
<p>In my WPF application, I have a number of databound TextBoxes. The <code>UpdateSourceTrigger</code> for these bindings is <code>LostFocus</code>. The object is saved using the File menu. The problem I have is that it is possible to enter a new value into a TextBox, select Save from the File menu, and never persist t... | <p>I found that removing the menu items that are scope depended from the FocusScope of the menu causes the textbox to lose focus correctly. I wouldn't think this applies to ALL items in Menu, but certainly for a save or validate action.</p>
<pre><code><Menu FocusManager.IsFocusScope="False" >
</code></pre>
| <p>The easiest way is to <em>set the focus somewhere</em>.<br>
You can set the focus back immediately, but setting the focus anywhere will trigger the LostFocus-Event on <strong>any type of control</strong> and make it update its stuff:</p>
<pre><code>IInputElement x = System.Windows.Input.Keyboard.FocusedElement;
Dum... | 8,175 |
<p>Are asymmetrical cryptographic keys fundamentally inter-convertible between the major key container formats? For example, can I convert an X.509 key file into a PGP or OpenGPG key file? </p>
<p>And--assuming the answer is yes--is it "security neutral" to keep one key pair in whatever format and convert into whichev... | <p>Yes and no: yes, the RSA keys embedded into certificates and privkeys are just numbers. You can extract them from the certificate and use them to build keys in other formats. This is commonly done to convert between different certificate formats. </p>
<p>PGP has some support for X.509 for S/MIME, but no ability to ... | <p>I'd also have a look at OpenSSL. It has so many different -in and -out functions that will likely be able to convert certs. from one type to the other.</p>
<p>Have a look at <a href="http://marc.info/?l=openssl-users&m=105162569405053&w=2" rel="nofollow noreferrer">http://marc.info/?l=openssl-users&m=10... | 8,160 |
<p>I've got a website that I've just uploaded onto the interwebs, and it's displaying differently using Firefox 3.0.1 on Ubuntu and WinXP.</p>
<p>Two things I've noticed on Ubuntu:</p>
<ol>
<li>The favicon is missing </li>
<li>The background color isn't displaying (it's set in the stylesheet)</li>
</ol>
<p>What have... | <p>I would first suggesting getting you html and css code validated. If there are any errors in your markup, these can cause errors in the rendering.</p>
<ul>
<li><a href="http://jigsaw.w3.org/css-validator/" rel="noreferrer">CSS Validator</a></li>
<li><a href="http://validator.w3.org/" rel="noreferrer">HTML Validator... | <p>i believe this is a font issue and a browser / OS issue.</p>
<p>we know that different firefox versions are dependent on the OS - there are some firefox extensions available for Linux, some firefox extensions for windows are available.
it's the font I guess.</p>
<p>Try to download mtts core fonts (microsoft true ... | 2,801 |
<p>Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if any did you employ. I've read a litt... | <p>I've mainly used plain ASP.NET pages that return XML for situations that are mainly one-way (data from ASP.NET --> Flex/Flash) communication. The Flex side just uses a URLLoader to hit the ASP.NET page and loads the result as XML.</p>
<p>If the communication needs to be a little more two-sided (sending more than a ... | <p>I've mainly used plain ASP.NET pages that return XML for situations that are mainly one-way (data from ASP.NET --> Flex/Flash) communication. The Flex side just uses a URLLoader to hit the ASP.NET page and loads the result as XML.</p>
<p>If the communication needs to be a little more two-sided (sending more than a ... | 6,688 |
<p>Our site is dealing with electronics and practical engineering, so we use formulas in questions and answers on occasion, most usually when we have to figure out electronic ratings. </p>
<p>When we talk about the <a href="https://3dprinting.stackexchange.com/questions/760/analytic-equations-to-make-algorithm-of-3d-p... | <p>$$\text{3D Printing Stack Exchange} \subset \text{Stack Exchange sites that use MathJax}$$</p>
<p>There are <a href="http://data.stackexchange.com/3dprinting/query/879802/mathjax-inline" rel="nofollow noreferrer">~17 posts</a> that could use an edit. Most of those are prices that have been converted into MathJax. ... | <p>MathJax would be really helpful:</p>
<p>We recently discussed <a href="https://3dprinting.stackexchange.com/questions/6832/how-is-infill-generated-via-slicing/6836#6836">How is infill generated via slicing?</a> and the answer is linear algebra. Displaying linear algebra without formulas is a PITA.</p>
| 53 |
<p>What's the "right" way to do the following as a boolean expression?</p>
<pre><code>for i in `ls $1/resources`; do
if [ $i != "database.db" ]
then
if [ $i != "tiles" ]
then
if [ $i != "map.pdf" ]
then
if [ $i != "map.png" ]
then
... | <p>The other solutions have a couple of common mistakes:
<a href="http://www.pixelbeat.org/programming/shell_script_mistakes.html" rel="nofollow noreferrer">http://www.pixelbeat.org/programming/shell_script_mistakes.html</a></p>
<ol>
<li><p><code>for i in $(ls ...)</code> is redundant/problematic
just do: <code>for i ... | <pre><code>for i in `ls $1/resources`; do
if [ $i != "database.db" ] && [ $i != "tiles" ] && [ $i != "map.pdf" ] && [ $i != "map.png" ]; then
svn export -q $1/resources/$i ../MyProject/Resources/$i
</code></pre>
| 7,123 |
<p>I am trying to add the line</p>
<blockquote>
<p>G4 P4000 G1 F4000 E-50</p>
</blockquote>
<p>to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip lines or does it not matter at all?</p>
<blockquote>
<p>G4 P4000<br>
G1 ... | <p>Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the lines one by one until it reaches the end.</p>
<p>If you instruct the printer to wait (<code>G4</code> dwell), it wi... | <p>This needs to be on two lines like in your second example:</p>
<blockquote>
<p>G4 P4000<br>
G1 F4000 E-50</p>
</blockquote>
<p>See the RepRap Gcode Wiki for more info. <a href="https://reprap.org/wiki/G-code" rel="nofollow noreferrer">https://reprap.org/wiki/G-code</a></p>
<p>EDIT: if you actually want to ret... | 1,089 |
<p>Recently started using my kit Prusa I3 Mk3 and noticed that with large horizontal surfaces a wrinkling pattern is emerging.</p>
<p>As you can see in the image the wrinkles seem to run parallel, the surface is 10 mm above the build plate with all bridges fully supported.</p>
<p>Has anyone seen this before? All... | <p><em>Waves in printed surfaces with <a href="https://en.wikipedia.org/wiki/Fused_filament_fabrication" rel="nofollow noreferrer">FFF</a> are observed at either the bottom layer (common) or the top layer (less common).</em></p>
<h2>Waves in bottom layer</h2>
<p>Rippling/wave generation/wrinkling is a common problem fo... | <p>Might just be that you are bridging without collapsing but still have some visible sag. Things to try:</p>
<p>1) increase the support/infil density. If slic3r has a configurable setting like Cura does, you only need to increase the density for the last couple mm prior to the top layer.</p>
<p>2) increase the top... | 1,236 |
<p>I want to be able to capture the exception that is thrown when a user requests a non-existent controller and re-direct it to a 404 page. How can I do this?</p>
<p>For example, the user requests <code>http://www.nosite.com/paeges/1</code> (<em>should be</em> <code>/pages/</code>). How do I make it so they get re-dir... | <p>Take a look at <a href="http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/" rel="noreferrer">this page</a> for routing your 404-errors to a specified page.</p>
| <p>Found this on the same site - <a href="http://richarddingwall.name/2008/08/17/strategies-for-resource-based-404-errors-in-aspnet-mvc/" rel="nofollow noreferrer">Strategies for Resource based 404s</a></p>
| 4,028 |
<p>What database should a beginner use in the C language?</p>
<p>Can I use MySQL?</p>
<p>Thanks</p>
| <p>You can use SQLite, MySQL, PostgreSQL, or any other DBMS with a C language binding.</p>
<ul>
<li><a href="http://www.sqlite.org/quickstart.html" rel="noreferrer">SQLite In 5 Minutes Or Less</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.1/en/c.html" rel="noreferrer">MySQL C API</a></li>
<li><a href="http:/... | <p>MySQL has C bindings, so you could use that; libmysql usually installs the necessary headers and library files. You might also experiment with something like <a href="http://www.sqlite.org/" rel="nofollow noreferrer">SQLite</a> if you just want to mess about with a DBMS in C.</p>
| 6,451 |
<p>I’ve a Flashforge Adventurer 3 which I’ve found to be a fantastic out of the box ready to go printer. I’ve clocked up 500 hours on it.</p>
<p>I’ve had issues where the nozzle was too close to the print bed, making it impossible for the extruder wheel to force filament down the bowden tube. With harder filaments that... | <p>Nozzles do degrade with use. That is why they're made to be easily replaceable.</p>
<p>Your problem may be a worn nozzle or incomplete cleaning or something with the bowden tube etc,. but an easy troubleshooting step is just to replace the nozzle.</p>
| <p>I have had this happen at times. I finally got it to go away once I fixed my bed adhesion.</p>
<p>By chance is your print curling up near the edges? If it's popping up and exerting backpressure on the extruder, that can be enough to cause an internal jam and the extruder "clicking" (which is itself just a ... | 2,179 |
<p>Whenever I use a macro in Visual Studio I get an annoying tip balloon in the system tray and an accompanying "pop" sound. It says:</p>
<blockquote>
<p>Visual Studio .NET macros</p>
<p>To stop the macro from running, double-click the spinning cassette.<br>
Click here to not show this balloon again.</p>
</bl... | <p>This will disable the pop up:</p>
<p>For Visual Studio 2008:</p>
<pre>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0<br>
DWORD DontShowMacrosBalloon=6</pre>
<p>For Visual Studio 2010 (the DWORD won't be there by default, use <code>New | DWORD value</code> to create it):</p>
<pre>HKEY_CURRENT_USER\Software... | <p>Okay, I found a way to make the balloon clickable, and clicking it does indeed stop it from popping up again. (On the other site I referenced in the original question the question asker claims that this is not the case. Though he was in VS2005 and I'm using VS2008.)</p>
<p>Anyway, I inserted a pause line in the mac... | 7,090 |
<p>It looks like we'll be adding <a href="http://en.wikipedia.org/wiki/Captcha" rel="noreferrer">CAPTCHA</a> support to Stack Overflow. This is necessary to prevent bots, spammers, and other malicious scripted activity. We only want human beings to post or edit things here!</p>
<p>We'll be using a JavaScript (jQuery) ... | <p><a href="http://gatekiller.co.uk/Post/JavaScript_Captcha" rel="noreferrer">A method that I have developed</a> and which seems to work perfectly (although I probably don't get as much comment spam as you), is to have a hidden field and fill it with a bogus value e.g.:</p>
<pre class="lang-html prettyprint-override">... | <p>One option would be out-of-band communication; the server could send the user an instant message (or SMS message?) that he/she then has to type into the captcha field.</p>
<p>This imparts an "either/or" requirement on the user -- either you must enable JavaScript OR you must be logged on to your IM service of choic... | 2,991 |
<p>How is it possible to read/write to the Windows registry using Java?</p>
| <p>I know this question is old, but it is the first search result on google to "java read/write to registry". Recently I found this amazing piece of code which:</p>
<ul>
<li>Can read/write to ANY part of the registry. </li>
<li>DOES NOT USE JNI.</li>
<li>DOES NOT USE ANY 3rd PARTY/EXTERNAL APPLICATIONS TO WORK.</li>
... | <p>I prefer using <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/preferences/overview.html" rel="nofollow">java.util.prefs.Preferences</a> class.</p>
<p>A simple example would be </p>
<pre><code>// Write Operation
Preferences p = Preferences.userRoot();
p.put("key","value");
// also there are variou... | 8,766 |
<p>I have a custom built ajax [div] based dynamic dropdown. </p>
<p>I have an [input] box which; <code>onkeyup</code>, runs an Ajax search which returns results in <code>div</code>s and are drawn back in using <code>innerHTML</code>. These <code>div</code>s all have highlights <code>onmouseover</code> so, a typical su... | <p>What you need to do is attach event listeners to the <code>div</code> with <code>id="results"</code>. You can do this by adding <code>onkeyup</code>, <code>onkeydown</code>, etc. attributes to the <code>div</code> when you create it or you can attach these using JavaScript.</p>
<p>My recommendation would be that yo... | <p>Off the top of my head, I would think that you'd need to maintain some form of a data structure in the JavaScript that reflects the items in the current dropdown list. You'd also need a reference to the currently active/selected item. </p>
<p>Each time <code>keyup</code> or <code>keydown</code> is fired, update the... | 2,687 |
<p>How can I host a (<code>.Net, Java, VB6, MFC, etc</code>) application in a <code>WPF window</code> ?.</p>
<p>I have a need to use <code>WPF windows</code> to wrap external applications and control the window size and location. </p>
<p>Does anyone have any ideas on how to accomplish this or a direction to research... | <p>Use a HwndHost to host the outside window in your application.</p>
| <p>This <a href="http://www.ddj.com/windows/197003872?pgno=2" rel="nofollow noreferrer">article</a> explains how to use HwndHost along with a few other Win32 API calls to accomplish the task.</p>
| 9,358 |
<p>Just looking for the first step basic solution here that keeps the honest people out.</p>
<p>Thanks,
Mike</p>
| <p>Sure thing, the simplest way is this:</p>
<pre><code>select foo from bar where baz in (1,2,3)
</code></pre>
| <p>while <code>in</code> is a shortcut for <code>or</code> and I wasn't sure how I could combine <code>in</code> with <code>and</code>, I did it this way</p>
<pre><code> SELECT * FROM table
WHERE column1='x' AND (column2='y' OR column2='z');
</code></pre>
| 3,846 |
<p>I have a 3D printer, which wasn't used for a longer time. There is a nozzle, but don't know what diameter is it. I used several widths - from 0.2 to 0.8, switched them depending on my needs, but don't remember which one was used lately.
The nozzle is a little bit worn down, so the diameter on the side is not visible... | <p>The best method is to have a scale on your microscope that looks like a ruler drawn in the optical path. However I usually visually compare an unknown nozzle with known nozzles under a microscope. If you don't have a microscope, you can get USB otoscope cameras (15mm focal length for looking in ears) for under $20... | <p>Majority of nozzles have a .4 or a .3 on it, that indicates how big it is in millimeters. If yours doesn't, take one of these digital rulers (the ones that have the prongs that stick out on the side and slides, I don't know the name off of the top of my head), extrude some filament and measure the filament, make sur... | 1,944 |
<p>I'd like to indicate to the user of a web app that a long-running task is being performed. Once upon a time, this concept would have been communicated to the user by displaying an hourglass. Nowadays, it seems to be an animated spinning circle. (e.g., when you are loading a new tab in Firefox, or booting in Mac OS ... | <p>Google <strong>Ajax activity indicator</strong> to find lots of images and image generators (the "spinning" image itself is an animated GIF). </p>
<p>Here is <a href="http://www.ajaxload.info/" rel="nofollow noreferrer">one link</a> to get you started.</p>
<p>With the image in hand, use JQuery to toggle the visibi... | <p>I assume you meant something to indicate background activity during an Ajax call.</p>
<p>I tend to have a CSS class which sets the background image to a little animated GIF, with appropriate padding and positioning (remember to turn background-repeat off), and then add and remove that class using a couple of JavaSc... | 6,243 |
<p>I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created. </p>
<p>The tests on my developm... | <p>According to <a href="http://www.mapforums.com/load-new-map-separate-thread-keep-ui-responsive-4605.html" rel="nofollow noreferrer">these</a> <a href="http://www.mapforums.com/activex-performance-net-3415.html" rel="nofollow noreferrer">threads</a> at mapforums.com the slowness of ActiveX startup is well known and u... | <p>Yes the Application version runs on its own thread - so this should be a quicker alternative - easier to do your own stuff whilst it is starting up. However, MapPoint 2010 tends to take a few seconds to start up when started by a user.</p>
<p>I would create a temporary GUI thread and use this to display a splash sc... | 8,453 |
<p>I've been really enjoying Python programming lately. I come from a background of a strong love for C-based coding, where everything is perhaps more complicated than it should be (but puts hair on your chest, at least). So switching from C to Python for more complex things that don't require tons of speed has been mo... | <p>Part of learning a new programming language is learning to read code in that language. A crutch like this may make it easier to read your own code, but it's going to impede the process of learning how to read anyone else's Python code. I really think you'd be better off getting rid of the end of block comments and... | <p>I would look in to understanding more details about Python syntax. Often times if a piece of code looks odd, there usually is a better way to write it. For example, in the above example:</p>
<pre><code>bar = foo if baz else None
while bar not biz:
bar = i_am_going_to_find_you_biz_i_swear_on_my_life()
did_i_not... | 7,458 |
<p>I'm just wondering if it exists better solution for this.</p>
<pre><code>BitConverter.ToInt32(sample_guid.ToByteArray(), 0)
</code></pre>
| <p>I don't think there's a better solution than this. </p>
| <p>Dunno about a better solution, but I hope you don't intend to use that Int32 as a random (or unique) value. </p>
<p>You cannot depend on any sub part of a Guid to be unique. Guid is assumed to be unique, only in its entirety.</p>
| 6,749 |
<p>We were having a problem with our build server not checking out modifications from source control despite recognizing that there had been changes.</p>
<p>It was traced to the control folder (not sure what it's real name is), the existing working builds were using _svn. Clearing the working folder forced a new compl... | <p>The business about _svn vs. .svn was an issue with Visual Studio web projects only (and I'm fairly sure it was fixed in VS2005 anyway), it's not a general "_svn works better with VS" thing.</p>
<p>It's also only a working-copy issue, not a repository issue - i.e. it doesn't matter if some users of SVN are using cli... | <p>As far as I know _svn is needed, because WebApplications have problems when one of their directories begins with a point.</p>
| 3,320 |
<p>I have a Prusa i3 3D printer and am using Slic3r for slicing.</p>
<p>I've noticed that my extruder is underextruding. I've correctly set the nozzle diameter and the filament diameter and I've already tried to increment the extrusion multiplier (which is currently set to 1.1). As Slic3r suggests this is a maximum val... | <p>I have a Prusa i3 pro b, and was having a similar issues. Turns out the spring for the plastic extruder feeder can be too slack. I printed <a href="https://www.thingiverse.com/thing:1936289" rel="nofollow noreferrer">these</a> at 2 mm and put it under the spring and it solved my issue.</p>
| <p>It looks like the nozzle is too far from the bed, try leveling the bed again - that should solve the problem.</p>
| 1,710 |
<p>I had the BLTouch (3.1) working with stock firmware on an Ender 3 v2 but wanted to get a 5x5 mesh instead of the 3x3 so I installed the TH3D firmware. With the stock firmware my Z-offset was -2.95 mm.</p>
<p>After installing TH3D firmware, my Z-offset has to be in excess of -6 mm to reach the same nozzle-to-bed heig... | <p>I'm pretty sure something is wrong with the firmware I downloaded. I flashed the 3/5/21 version of Marlin firmware from <a href="https://marlin.crc.id.au/" rel="nofollow noreferrer">https://marlin.crc.id.au/</a> and it is somehow working better with the LCD firmware (which I got from TH3D), the Z offset is working a... | <p>Do you still have this issue? My Ender with a BLTouch won't respect the Z-off set setting in <strong>Motion</strong> > <strong>Control</strong> > <strong>ZOffset</strong>. You can change it to -10 and it will still start printing about 1 cm above the bed.</p>
<p>All of this started to happen after I used <stro... | 1,881 |
<p>I have been printing toy cars for about a month now and my Ender 3 has stopped extruding plastic even when I insert filament, it has been about a day since it stopped working. Is there any tips for getting it working again?</p>
<p>I tried manual feeding which worked.</p>
| <p>You need to figure out what is not working</p>
<ul>
<li>Is the hotend getting hot? If not, melted filament won't come out.</li>
<li>Is the nozzle clogged? In your toolkit was a bit of thin wire for poking into the nozzle - try that and see what happens.<br> You may need to heat the hotend, extract the filament, ... | <p>My comment refuses to upload so I think it’ll be ok if I just put it here:</p>
<p>Thanks this fixed it I had to replace my hot end as the one had broken for some reason but now it is fully working again, thank you so much!</p>
<p>Sorry for all the mistakes in formatting, I am new I joined 3 days ago.</p>
| 2,033 |
<p>As some people probably know, this is the 3rd iteration of a SE site proposal whose scope covers 3D printers. The first 2 were <a href="http://area51.stackexchange.com/proposals/22246/personal-manufacturing">Personal Manufacturing</a>(before my time) and <a href="http://area51.stackexchange.com/proposals/41850/digit... | <p>Please look into <a href="/questions/147/hobbyist-machine-questions-on-topic">this question</a>, which is a similar question as you ask. </p>
<p>I think the general consensus is that CNC and laser cutting machines fall in the same category as 3D printers with respect to control, axis, modeling, etc. as the differen... | <p>Please look into <a href="/questions/147/hobbyist-machine-questions-on-topic">this question</a>, which is a similar question as you ask. </p>
<p>I think the general consensus is that CNC and laser cutting machines fall in the same category as 3D printers with respect to control, axis, modeling, etc. as the differen... | 61 |
<p>Normally stainless steel is magnetic. But whenever i order stainless steel nozzles from Amazon, they are not magnetic. This makes me think they could be brass coated in something like aluminum. However, there are many types of steel.</p>
<p>I've attached an image of someone who reviewed these nozzles. He says they ... | <p>Let's preface, that there are a LOT of metal identification methods. For example, I found <a href="http://fac.ksu.edu.sa/sites/default/files/Metal%20Identification%20Ready%20_unprotected.pdf" rel="nofollow noreferrer">this guide</a> helpful and I had been at the scrapyard lately, where I have been told that 90+% of ... | <p>Stainless steel is created by adding elements (usually Chromium, but also Nickel) to steel. These added elements form an oxide layer with the outside air protecting the steel from corroding. </p>
<p>Whether stainless steel is magnetic or not depends on the added elements and the micro structure of the steel; some a... | 1,480 |
<p>I'm trying to fully understand all of Haskell's concepts.</p>
<p>In what ways are algebraic data types similar to generic types, e.g., in C# and Java? And how are they different? What's so algebraic about them anyway? </p>
<p>I'm familiar with universal algebra and its rings and fields, but I only have a vague ide... | <p>Haskell's <em>algebraic data types</em> are named such since they correspond to an <em>initial algebra</em> in category theory, giving us some laws, some operations and some symbols to manipulate. We may even use algebraic notation for describing regular data structures, where:</p>
<ul>
<li><code>+</code> represents... | <p>For me, the concept of Haskell's algebraic data types always looked like polymorphism in OO-languages like C#.</p>
<p>Look at the example from <a href="http://en.wikipedia.org/wiki/Algebraic_data_types" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Algebraic_data_types</a>:</p>
<pre><code>data Tree = Empt... | 3,745 |
<p>Am just wondering if any conclusions can be drawn from this:</p>
<p><a href="https://i.stack.imgur.com/0RNE3.png" rel="nofollow noreferrer" title="Photo of poor adhesion"><img src="https://i.stack.imgur.com/0RNE3.png" alt="Photo of poor adhesion" title="Photo of poor adhesion"></a></p>
<p>Three corners are solid, ... | <p>From here: <a href="https://io3dprint.com/review-anycubic-i3-mega-ultrabase/" rel="nofollow noreferrer">https://io3dprint.com/review-anycubic-i3-mega-ultrabase/</a></p>
<blockquote>
<p>Ultrabase Bed
The Anycubic i3 Mega Ultrabase is the latest version in the Anycubic i3 family. As hinted in the name, the main ... | <p>From here: <a href="https://io3dprint.com/review-anycubic-i3-mega-ultrabase/" rel="nofollow noreferrer">https://io3dprint.com/review-anycubic-i3-mega-ultrabase/</a></p>
<blockquote>
<p>Ultrabase Bed
The Anycubic i3 Mega Ultrabase is the latest version in the Anycubic i3 family. As hinted in the name, the main ... | 1,403 |
<p>There are numerous <a href="http://en.wikipedia.org/wiki/Agile_software_development" rel="nofollow noreferrer">Agile software development</a> methods. Which ones have you used in practice to deliver a successful project, and how did the method contribute to that success? </p>
| <p>I've been involved with quite a few organisations which claimed to work in an 'agile' way, and their processed usually seemed to be base on XP (extreme programming), but none of them ever followed anywhere near all the practices.</p>
<p>That said, I can probably comment on a few of the XP practices</p>
<ul>
<li><p... | <p>I've been working with a team using XP and Scrum practices sprinkled with some lean. It's been very productive.</p>
<p><strong>Daily Standup</strong>- helps us keep complete track of what and where everyone is working on.</p>
<p><strong>Pair Programming</strong>- has improved our code base and helped remove "sill... | 2,829 |
<p>What is the best SVN Ignore Pattern should TortoiseSVN have for a VB.NET solution?</p>
| <p>this is what I use for C# w/resharper, should work just the same with vb.net:</p>
<pre><code>build deploy */bin */bin/* obj *.dll *.pdb *.user *.suo _ReSharper* *.resharper* bin
</code></pre>
| <p>I always add Thumbs.db in as well, because I hate having those files versioned. Probably more of an issue for web developers </p>
| 2,612 |
<p>I am trying to 3D print an iPhone case, however, I want it to print standing up. Is this possible to do?</p>
<p>I have a picture of the case in the link below.<a href="https://i.stack.imgur.com/dUYr0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dUYr0.png" alt="iphone case"></a></p>
| <p>Yes this is possible. For an FDM/FFF printer, you'll need to print with supports. I might also recommend printing in PLA to minimize the chance of warping during the print (from experience).</p>
<p>It might also help to slow down the feedrate to ensure smooth surface finish and avoiding delamination on such small la... | <p>You have a few options. First. I would change the design. Why not make it negative space instead? Else as the other user mentioned, glue the star on later.</p>
<p>Other options are, come up with a modular design so you do not print it as one piece. </p>
<p>From there you can do some more advanced things such as pr... | 348 |
<p>Do you know where I could find some useful third party (free) code snippets for VS 2008?</p>
| <p><a href="http://gotcodesnippets.com/" rel="nofollow noreferrer">http://gotcodesnippets.com/</a><br>
<a href="http://www.codekeep.net/" rel="nofollow noreferrer">http://www.codekeep.net/</a> has a VS add-in for their snippets, too</p>
| <p>bdukes site has more options, but here are the ones MSDN has published...</p>
<p><a href="http://msdn.microsoft.com/en-us/vstudio/aa718338.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/vstudio/aa718338.aspx</a></p>
| 4,597 |
<p>I have PHP configured so that magic quotes are on and register globals are off.</p>
<p>I do my best to always call htmlentities() for anything I am outputing that is derived from user input.</p>
<p>I also occasionally seach my database for common things used in xss attached such as...</p>
<pre><code><script
</... | <p>Escaping input is not the best you can do for successful XSS prevention. Also output must be escaped. If you use Smarty template engine, you may use <code>|escape:'htmlall'</code> modifier to convert all sensitive characters to HTML entities (I use own <code>|e</code> modifier which is alias to the above).</p>
<p>M... | <p>It is difficult to implement a thorough sql injection/xss injection prevention on a site that doesn't cause false alarms. In a CMS the end user might want to use <code><script></code> or <code><object></code> that links to items from another site. </p>
<p>I recommend having all users install FireFox wit... | 9,682 |
<p>Note: I have extended my question as some of you mentioned that the question is not clear.</p>
<p>I am using a RAMPS 1.4 board with an Arduino mega 2560. I need to drive a stepper motor as an extruder using either E0 or E1. I am using Repetier-Firmware and can drive the extruder (stepper motor) using the E0 (RAMPS ... | <p><strong>The edited question</strong> appears to mention that <strong>the actual extruders of the print head need to home / limit themselves</strong>. The answer is that this is not required. When operating direct or Bowden driven extruder setups, you know (or you can measure or find out experimentally) the distance ... | <p>I think the question has already been answered(if at all possible because the question is still not clear exactly what you mean), but let me try putting this a different way.</p>
<p>You have to ask yourself what is homing and why are you doing it. The purpose of homing your axes is to set their 0 position in space.... | 876 |
<p>Just a random thought, and if I wasn't asking the question myself I'd probably down vote it, but... are screenshots the best way to show printer settings, or would a text version be better? </p>
<p>Ok, yes, a screenshot is probably easier to do and post, and will show a familiar UI and be easy on the eye and make ... | <p>Text would probably be best because it is searchable, so things can be found faster then by just looking at the long list of settings available in any slicer/printer/device available with your own eyes.</p>
<p>However, as far as I'm aware, exporting settings in text format from a slicer/printer is still wishful thi... | <p>The problem with settings is that there are so much settings, if OP's are asked to post certain settings the OP or the one that helps might miss some other parameters that would be visible in a screenshot. I was able to spot a few problems already using the screenshots.</p>
<p>Another thought: "What would you gain ... | 62 |
<p>Is there a <a href="http://en.wikipedia.org/wiki/Box_plot" rel="nofollow noreferrer">Box Plot</a> graph, or box and whisker graph available for Reporting Services 2005? From the looks of the documentation there doesn't seem to be one out of the box; so I am wondering if there is a third party that has the graph, or ... | <p>There definitely isn't a Box Plot built into SSRS 2005, though it's possible that 2008 has one. SSRS 2005 does have a robust extension model. If you can implement a chart in System.Drawing/GDI+, you can make it into a <a href="http://msdn.microsoft.com/en-us/magazine/cc188686.aspx" rel="nofollow noreferrer">custom... | <p><a href="http://sourceforge.net/project/showfiles.php?group_id=114675" rel="nofollow noreferrer">ZedGraph</a> is a good open source alternative.</p>
| 4,750 |
<p>I dont want the part cooling fan on during preheat, especially when I'm only heating the bed, it is just unnecessarily loud and serves no purpose at that time.</p>
<p>However when I set <code>PREHEAT_1_FAN_SPEED</code> to 0 it has no effect, the fan still spins at full speed as soon as I preheat either the hotend o... | <p>Apparently, I forgot a critical step:</p>
<p>While I have completely reconfigured the LCD menus, setup custom 25-point mesh leveling, changed a bunch of other numerical values, and flashed the firmware dozens of times, certain values will never be updated unless you remember to <strong>initialize the EEPROM</strong... | <p><em>This answer is now obsolete now that the OP has updated the question with additional information. It is left here as a possible solution for those who have tinkered with there firmware.</em></p>
<hr>
<p>Part cooling fan speed during preheat (from menu) is controlled by the setting </p>
<pre><code>#define PREH... | 1,161 |
<p>How do I convert the RGB values of a pixel to a single monochrome value?</p>
| <p>I found one possible solution in the <a href="http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html" rel="noreferrer">Color FAQ</a>. The <em>luminance component</em> Y (from the <em>CIE XYZ system</em>) captures what is most perceived by humans as color in one channel. So, use those coefficients:</p>
<pre><co... | <p>The logic behind converting any RGB based picture to monochrome can is not a trivial linear transformation. In my opinion such a problem is better addressed by "Color Segmentation" techniques. You could achieve "Color segmentation" by k-means clustering.</p>
<p>See reference example from MathWorks site.</p>
<p><a... | 3,509 |
<p>Your backend could be PHP or Python but you want to use the controls from the ASP.NET toolkit is there a successful way to do this?</p>
| <p>I don't think that it is possible.</p>
<p>The ASP.NET AJAX Toolkit is based on ASP.NET technique (what a surprise) and needs ASP.NET.</p>
<p>It contains server-side controls, which are translated to HTML and Javascript by the ASP.NET engine. It is not working without the engine.</p>
<p>However you can check the c... | <p>I have found that much of the functionality in AJAX Control Toolkit can be accomplished via the javascript frameworks such as jQuery.</p>
| 7,717 |
<p>A sample perl script that connects to an oracle database, does a simple SELECT query, and spits the results to stdout in CSV format would be great. Python or any other language available in a typical unix distribution would be fine too. </p>
<p>Note that I'm starting from scratch with nothing but a username/passw... | <p>In perl you could do something like this, leaving out all the my local variable declarations and ... or die "failmessage" error handling for brevity.</p>
<pre><code>use DBI;
use DBD::Oracle;
$dbh = DBI->connect( "dbi:Oracle:host=127.0.0.1;sid=XE", "username", "password" );
# some settings that you usually wan... | <p>Mathematica has a package "DatabaseLink" built in that should make this easy but you need to find a driver for Oracle. Installing the "oracle client libraries" should do that...</p>
| 9,116 |
<p>I am trying to print my first test but my Creality Ender 3 starts printing near the front edge and within 10 seconds is printing in front of the tray (off onto my table). I really think it should be starting the print in the middle and then never going so close to the edge and even over it</p>
<p>What can I do?</p... | <p>When a print is not printing on the build platform, you either:</p>
<ol>
<li><p>Have the incorrect settings in the slicer (e.g. Ultimaker Cura, <a href="https://3dprinting.stackexchange.com/a/6450/5740">a common mistake is that the "origin at center" option is active</a>), or</p></li>
<li><p>Have the center of the ... | <p>When a print is not printing on the build platform, you either:</p>
<ol>
<li><p>Have the incorrect settings in the slicer (e.g. Ultimaker Cura, <a href="https://3dprinting.stackexchange.com/a/6450/5740">a common mistake is that the "origin at center" option is active</a>), or</p></li>
<li><p>Have the center of the ... | 1,115 |
<p>I have a large GUI project that I'd like to port to Linux.
What is the most recommended framework to utilize for GUI programming in Linux? Are Frameworks such as KDE / Gnome usable for this objective Or is better to use something more generic other than X?</p>
<p>I feel like if I chose one of Gnome or KDE, I'm clo... | <p>Your best bet may be to port it to a cross-platform widget library such as <a href="http://en.wikipedia.org/wiki/WxWidgets" rel="noreferrer">wxWidgets</a>, which would give you portability to any platform wxWidgets supports.</p>
<p>It's also important to make the distinction between Gnome libraries and GTK, and lik... | <p>Have you thought of using Mono? Programs like Paint.NET work great under Linux & Windows.</p>
| 5,633 |
<p>Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported.</p>
<p>The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.</p>
| <p>I figured it out. It goes something like this:</p>
<pre><code><form method="post" action="<%= Html.AttributeEncode(Url.Action("CastUpVote")) %>">
<input type="submit" value="<%=ViewData.Model.UpVotes%> up votes" />
</form>
</code></pre>
| <p><code><asp:Button></code> is the ASP.NET equivalent to the HTML.Button. It will by default generate an <code><input type="button"></code>. (This is the System.Web.UI.WebControls.Button class)</p>
| 8,380 |
<p>If a user saves the password on the login form, ff3 is putting the saved password in the change password dialoge on the profile page, even though its <strong>not the same input name</strong> as the login. how can I prevent this?</p>
| <p>Try using autocomplete="off" as an attribute of the text box. I've used it in the past to stop credit card details being stored by the browser but i dont know if it works with passwords. e.g. <code>print("<input type="text" name="cc" autocomplete="off" />");</code></p>
| <p>Some sites have 3 inputs for changing a password, one for re-entering the current password and two for entering the new password. If the re-entering input was first and got auto-filled, it wouldn't be a problem. </p>
| 9,892 |
<p>Here is my sample code:</p>
<pre><code>from xml.dom.minidom import *
def make_xml():
doc = Document()
node = doc.createElement('foo')
node.innerText = 'bar'
doc.appendChild(node)
return doc
if __name__ == '__main__':
make_xml().writexml(sys.stdout)
</code></pre>
<p>when I run the above code... | <p>Setting an attribute on an object won't give a compile-time or a run-time error, it will just do nothing useful if the object doesn't access it (i.e. "<code>node.noSuchAttr = 'bar'</code>" would also not give an error).</p>
<p>Unless you need a specific feature of <code>minidom</code>, I would look at <code>Element... | <p>Setting an attribute on an object won't give a compile-time or a run-time error, it will just do nothing useful if the object doesn't access it (i.e. "<code>node.noSuchAttr = 'bar'</code>" would also not give an error).</p>
<p>Unless you need a specific feature of <code>minidom</code>, I would look at <code>Element... | 4,890 |
<p>I'm printing a cylindrical piece but at any moment it breaks down. I tried it two times, both have break down in different place. I'm using a 1.75 mm PLA filament in my Anet A8. I'm using Cura 2.6.2 to export to a <code>.gcode</code> file.</p>
<p>This is the original model: </p>
<p><a href="https://i.stack.im... | <p>The first thought that pops into my mind is insufficient cooling. Consider to either slow down the nozzle speed or to construct a toss-away model nearby. I prefer the toss-away or duplicate model method. It allows the material printed on the first column to cool more effectively while the material on the second colu... | <p>The first thought that pops into my mind is insufficient cooling. Consider to either slow down the nozzle speed or to construct a toss-away model nearby. I prefer the toss-away or duplicate model method. It allows the material printed on the first column to cool more effectively while the material on the second colu... | 744 |
<p>Would it be posible to design something that is as flexible and that can be printed with PLA that would work as a cloth? I did some research and found that there was a company named Electroloom but that didn't make it. I'm not looking for anything fine, just something that would work for wiping</p>
| <p>Maybe you would be better off with TPU or some other type of flexible material...</p>
<p>I have been able to print PLA and have it flex quite a bit, but that was an ~0.2mm single layer print, I guess maybe up to 0.3-0.4mm should still be a little bit flexible, but not much. Also since you want it to wipe things, ma... | <p>You can not 3D print that because there is no nozzle or method for producing filaments of the required size. A few microns at least. You might be able to spin molten pla like cotton candy and it might absorb; but I doubt it.</p>
<p><a href="https://phys.org/news/2010-05-cotton-candy-machine-tiny-nanofibers.html" re... | 1,626 |
<p>I've been searching (with little success) for a free/opensource session clustering and replication solution for asp.net. I've run across the usual suspects (indexus sharedcache, memcached), however, each has some limitations.</p>
<ul>
<li><strong>Indexus</strong> - Very immature, stubbed session interface implemen... | <p>As far as Velocity is concerned I have heard some great things about that project lately. It's still in the developing stages and probably not primetime ready yet. But I think the project has a solid footing and will become a strong mature product from Microsoft and not fall off into the ether like you predict.</p>... | <p>Although Velocity has made progress from CTP1 to CTP2, it still leaves much to be desired. It will be some time before they provide all the important features in a distributed cache and even longer before it is tested in the market. I wish them good luck.</p>
<p>In the meantime, NCache already provides all CTP2 &am... | 3,345 |
<p>I have a situation where I want to add hours to a date and have the new date wrap around the work-day. I cobbled up a function to determine this new date, but want to make sure that I'm not forgetting anything.</p>
<p>The hours to be added is called "delay". It could easily be a parameter to the function instead.</... | <p>You should probably write some automated tests for each condition you can think of, and then just start brainstorming more, writing the tests as you think of them. This way, you can see for sure it will work, and will continue to work if you make further changes. Look up Test Driven Development if you like the res... | <p>I've worked with the following formula (pseudocode) with some success:</p>
<pre><code>now <- number of minutes since the work day started
delay <- number of minutes in the delay
day <- length of a work day in minutes
x <- (now + delay) / day {integer division}
y <- (now + delay) % day {modulo remain... | 2,723 |
<p>I have an FDM printer, I printed ABS for years.</p>
<p>Since SLA printers became really cheap lately and are able to print finer details, are there resins out there as strong as ABS/PLA?</p>
| <p>I'm an owner of both an FDM printer and a resin one:</p>
<p>I've long searched a resin capable of printing durable objects even in tiny details but with poor luck. I've tried ABS-Like resins, and they provide a slightly better resistance than regular resin but do not expect great improvements; I've tryed the siraya... | <p>I'm an owner of both an FDM printer and a resin one:</p>
<p>I've long searched a resin capable of printing durable objects even in tiny details but with poor luck. I've tried ABS-Like resins, and they provide a slightly better resistance than regular resin but do not expect great improvements; I've tryed the siraya... | 2,013 |
<p>We are bringing a new project in house and whereas previously all our work was on SQL Server the new product uses an oracle back end.</p>
<p>Can anyone advise any crib sheets or such like that gives an SQL Server person like me a rundown of what the major differences are - Would like to be able to get up and runnin... | <p>@hamishcmcn</p>
<p>Your assertion that '' == Null is simply not true. In the relational world Null should only ever be read to mean "I don't know". The only result you will get from Oracle (and most other decent databases) when you compare a value to Null is 'False'.</p>
<p>Off the top of my head the major differe... | <p>If you need to you can create and drop temporary tables in procedures using the <a href="http://www.dbasupport.com/oracle/ora9i/execute_immediate.shtml" rel="nofollow noreferrer">Execute Immediate</a> command.</p>
| 6,048 |
<p>Say you have an application divided into 3-tiers: GUI, business logic, and data access. In your business logic layer you have described your business objects: getters, setters, accessors, and so on... you get the idea. The interface to the business logic layer guarantees safe usage of the business logic, so all the ... | <p>If I understand the question correctly, you've created a domain model and you would like to write an object-relational mapper to map between records in your database and your domain objects. However, you're concerned about polluting your domain model with the 'plumbing' code that would be necessary to read and write... | <p>I always create a separate assembly that contains: </p>
<ul>
<li>A lot of small Interfaces (think ICreateRepository, IReadRepository, IReadListRepsitory.. the list goes on and most of them relies heavily on generics) </li>
<li>A lot of concrete Interfaces, like an IPersonRepository, that inherits from IReadReposi... | 3,065 |
<p>Which is better to use in PHP, a 2D array or a class? I've included an example of what I mean by this.</p>
<pre><code>// Using a class
class someClass
{
public $name;
public $height;
public $weight;
function __construct($name, $height, $weight)
{
$this -> name = $name;
... | <p>The "class" that you've constructed above is what most people would use a <em>struct</em> for in other languages. I'm not sure what the performance implications are in PHP, though I suspect instantiating the objects is probably more costly here, if only by a little bit.</p>
<p>That being said, if the cost is relati... | <p>If your code uses lot of functions that operate on those attributes (name/height/weight), then using class could be a good option.</p>
| 4,388 |
<p>I've been trying to use SQLite with the PDO wrapper in PHP with mixed success. I can read from the database fine, but none of my updates are being committed to the database when I view the page in the browser. Curiously, running the script from my shell does update the database. I suspected file permissions as the c... | <p>Kyle, in order for PDO/Sqlite to work you need write permission to directory where your database resides.</p>
<p>Also, I see you perform multiple selects in loop. This may be ok if you are building something small and not heavy loaded. Otherwise I'd suggest building single query that returns multiple rows and proce... | <p>@Tom
Depends on how the hosting is setup, If the server runs PHP as an Apache Module then its likely that it is 'nobody' (usually whatever user apache is setup as). But if PHP is setup as cgi (such as fast-cgi) and the server runs SuExec then php runs as the same user who owns the files. </p>
<p>Eitherway the folde... | 8,620 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.