instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>For my own project at home, I'm using the rather excellent managed subversion hosting from <a href="http://cvsdude.com/" rel="nofollow noreferrer">CVSDude</a>. As it's only me working on the code right now, I'm not using CruiseControl.net, however I expect this will change in the next couple of months and will want...
<p>Use a subrange of <code>[\u0000-\uFFFF]</code> for what you want.</p> <p>You can also use the <code>re.UNICODE</code> compile flag. <a href="http://docs.python.org/lib/re-syntax.html" rel="nofollow noreferrer">The docs</a> say that if <code>UNICODE</code> is set, <code>\w</code> will match the characters <code>[0-9...
<p>\X seems to be available as a generic word-character in some languages, it allows you to match a single character disregarding of how many bytes it takes up. Might be useful.</p>
3,518
<p>Really strange observation with my MP Select Mini V2 printing PLA. I've printed a dual-fan shroud so I can have a dedicated part-cooling fan. I've noticed that when I turn it on, the extruder starts stringing everywhere. Little tiny spider-web wisps. No amount of temperature change will make them go away (printing a...
<p>Prior to a move the print cooling fan causes the filament to cool on the outside while the nozzle is still hot, when it then moves it causes a strings to form that will be cooled instantly. This means that the cooling you have is too much and should be reduced.</p> <p>This printer has a single fan to cool the cold-...
<p>The fans are allowing the strings to harden instead of break. Maybe you should use more retraction or wipe before crossing perimeters to reduce material ooze during moves.</p>
1,035
<p>Is it possible in <code>PHP (as it is in C++)</code> to declare a <code>class method</code> OUTSIDE the <code>class definition?</code></p>
<p>No, as of PHP 5.2. However, you may use <code>__call</code> magic method to forward call to arbitrary function or method.</p> <pre><code>class A { public function __call($method, $args) { if ($method == 'foo') { return call_user_func_array('bar', $args); } } } function bar($x)...
<p>No it is not posible. if you define function/method outside class construct it becomes global function.</p>
9,699
<p>I've downloaded the IKVM sources (<a href="http://www.ikvm.net/" rel="nofollow noreferrer">http://www.ikvm.net/</a>) from <a href="http://sourceforge.net/cvs/?group_id=69637" rel="nofollow noreferrer">http://sourceforge.net/cvs/?group_id=69637</a></p> <p>Now I'm trying to get it to build in Visual Studio 2008 and a...
<p>I don't know that this would do it for you but can you try building from the command line?</p> <p>msbuild ________</p> <p>I think that's how I built the application due to the same issues.</p>
<p>This is how I built IKVM 8.1.5717.0 from source. Visual Studio is not required.</p> <ul> <li><p>Create a folder: c:\ikvm\</p></li> <li><p>Add the above folder to PATH (e.g. set PATH=%PATH%;c:\ikvm and leave command prompt open for later).</p></li> <li><p>Download: ikvmsrc-8.1.5717.0.zip (<a href="http://www.frijter...
9,713
<p>Older versions of the .Net Framework used to install "Microsoft .NET Framework v1.0 / v1.1 / v2.0 Configuration" in the Control Panel, under Administrative Tools. I just noticed that there isn't a v3.0 or v3.5 version of this. Is this functionality now hiding somewhere else, or do I have to use the command-line tool...
<p>Both 3 and 3.5 still use the <a href="http://en.wikipedia.org/wiki/Microsoft_.NET#.NET_Framework_3.0" rel="nofollow noreferrer">Common Language Runtime of .NET Framework 2.0</a>. So no control panel is needed, as you can still use the 2.0 control panel.</p>
<p>To sort out the confusion between the apparently conflicting answers above, this is my current understanding of the answer:</p> <ul> <li>Use the 2.0 version, as DAC and Codeslayer recommended</li> <li>If you don't <em>have</em> the 2.0 version (mine was helpfully uninstalled when I removed VS2005 and installed VS20...
6,511
<p>I have an interface that I have defined in C++ which now needs to be implemented in C#. What is the best way to go about this? I don't want to use COM at all in my interface definition. The way I have solved this right now is to to have two interface definitions, one in C++ and one in C#. I then expose the C# interf...
<p>If you are willing to use C++/CLI for your managed code instead of C#, then you can just consume the native C++ interface definition directly via the header file. How easy this will be will depend on exactly what is in your interface - simplest case is something that you could use from C.</p> <p>Take a look at Marc...
<p>You don't mention which version of .NET you're using, but something that's worked for me in using Visual Studio .NET 2003 is to provide a thin C# wrapper around the pimpled implementation of the real C++ class:</p> <pre><code>public __gc class MyClass_Net { public: MyClass_Net() :native_ptr_(new MyClass())...
9,024
<p>My Alfawise EX8 (Anet A8 Clone) had an issue, so I flashed the <a href="https://www.dropbox.com/s/e1ab6p2s8j61w6q/Marlin.rar?dl=0" rel="nofollow noreferrer">firmware</a> provided on the GearBest page. After the flash the LCD is no longer doing anything and I can't really identify the LCD to confirm whether the corre...
<p>According to the <a href="https://www.dropbox.com/s/e1ab6p2s8j61w6q/Marlin.rar?dl=0" rel="nofollow noreferrer">link to the fork of Marlin</a> you need to be sure that a bootloader is present before flashing, see <a href="https://www.dropbox.com/s/e1ab6p2s8j61w6q/Marlin.rar?dl=0&amp;file_subpath=%2FMarlin%2Fpins_MELZ...
<p>I have the same problem.</p> <p>I think it is not a bootloader problem because the screen is all blue but machine can work with serial connexion. I tried to use the new Jakub's file but it doesn't work either.</p> <p>I found new type of screen for EX8 on Marlin V2 called &quot;WYH_L12864_LCD&quot; - Has anyone tried...
1,482
<p>I have a TronXY printer (i3 Clone). It has a 220x220&nbsp;mm heated aluminum bed and I print with a Borosilicate glass plate.</p> <p>I have a slightly longer print (245&nbsp;mm) I would like to do and I think I could adjust to settings and end stop to stretch the y-dimension travel and I have found a 229x257&nbsp;...
<p>The aluminum plate is being heated by the heater element although I suspect the element does not encompass the entire area of the aluminum portion. There are going to be cooler spots on the aluminum but not enough to significantly affect the transfer to the glass.</p> <p>Once you extend the glass, without a corresp...
<p>After Fred's answer, I realized there was a way to test out how much the temperature would drop by offsetting my current glass base to extend past the exge then using a <a href="http://www.flir.com" rel="nofollow noreferrer">FLIR</a> IR Camera to see what the effect would be.</p> <p>Here are the results:</p> <p>Th...
651
<p>I am pretty sure that the settings that I am using are correct, so all possible things can be wrong which I should check out so that I can make authentication with our Active Directory work.</p>
<p>Try test if PHP can connect to active directory</p> <pre><code>&lt;?php $ds = ldap_connect('host.ad.lan', 389); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_bind($ds, 'admin@ad.lan', 'xxx'); $sr = ldap_search($ds, 'CN=Cameron Zemek,OU=Users,OU=BRC,DC=ad,DC=la...
<p>@grom... thanks but, yes PHP is working just fine. I have a WordPress and a MediaWiki installation on the same server, and they are both authenticating against the same active directory just fine.</p>
6,254
<p>I have a Tevo Tornado Gold 24&nbsp;V. I want to use this LJ12 A3-4-Z/BX Inductive NPN NO 4&nbsp;mm with 6-36&nbsp;V operation current as a Z probe. I do not want to fry my machine by putting in 24&nbsp;V into the sensor input.</p> <p>What do I have is a 12&nbsp;V, single channel optocoupler isolation module.</p> <...
<p><strong>You can safely use the module with 24V.</strong></p> <p>The input side shows a red LED, optocoupler and 1k resistor in series. The LED and optocoupler probably have a voltage drop in the neighbourhood of 3.1-3.5&nbsp;V put together, so for a 12&nbsp;V input you will get a current of approximately 9&nbsp;mA-...
<h2>Not using a 12 V rated module <em>&quot;on its own&quot;</em>.</h2> <p>Using a 12 V/5 V optocoupler to try to connect 24 V to the 5 V circuit is running the optocoupler outside of its rating, meaning you will destroy it, either immediately or after a short time.</p> <h2>A properly rated one</h2> <p>To shield the 5 ...
1,435
<p>Okay, here's the scenario. I have a utility that processes tons of records, and enters information to the Database accordingly.</p> <p>It works on these records in multi-threaded batches. Each such batch writes to the same log file for creating a workflow trace for each record. Potentially, we could be making close...
<p>I second the other answers here, <strong>depends on what you are doing with the data</strong>.</p> <p>We have two scenarios here:</p> <ol> <li><p>The majority of the logging is to a DB since admin users for the products we build need to be able to view them in their nice little app with all the bells and whistles....
<p>I think it depends greatly on what you are doing with the log files afterwards.</p> <p>Of the two operations writing to the log file will be faster - especially as you are suggesting writing to a database on another server.</p> <p>However if you are then trying to process and search the log files on a regular basi...
4,930
<p>I work on a complex application where different teams work on their own modules with a degree of overlap. A while back we got a Mediawiki instance set up, partly at my prompting. I have a hard job getting people to actually use it, let alone contribute.</p> <p>I can see a lot of benefit in sharing information. It m...
<p>Some tips:</p> <p>Any time someone sends information by email that really should be in a wiki, make a page for that topic and add what they put in the email. Then reply "Thanks for that info, I've put it into the wiki here so that it's easier to find in the future." </p> <p>Likewise, if you have information you n...
<p>Find "sticky" items (sub-3 pg. docs / diagrams / etc) something that the team seems to be creating again and again &amp; post it on the wiki. Make sure everyone has access to the wiki and knows its there - set up a notification mechanism if possible. With some luck, the next time they have to access, rather than dig...
3,668
<p>This is a self-explanatory question:</p> <p>Why does this thing bubble into my try catch's even when nothing is wrong? </p> <p>Why is it showing up in my log, hundreds of times?</p> <p><strong>I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them</strong></...
<p>This is probably coming from a Response.Redirect call. Check this link for an explanation:</p> <p><a href="http://dotnet.org.za/armand/archive/2004/11/16/7088.aspx" rel="noreferrer">http://dotnet.org.za/armand/archive/2004/11/16/7088.aspx</a></p> <p>(In most cases, calling Response.Redirect(url, false) fixes the ...
<p>Knowing that there are (at least) three APIs that internally use <code>Thread.Abort</code>, I'd like to answer in more practical terms, how to work out what to do about it.</p> <p>For us, this error started being logged all-of-a-sudden. What changed? We fixed a bug in some database procedure that was dealing with s...
3,348
<p>What characters are valid in a Java class name? What other rules govern Java class names (for instance, Java class names cannot begin with a number)?</p>
<p>You can have almost any character, including most Unicode characters! The exact definition is in <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8" rel="noreferrer">the Java Language Specification under section 3.8: Identifiers</a>.</p> <blockquote> <p>An <em>identifier</em> is an unlimit...
<p>Class names should be nouns in UpperCamelCase, with the first letter of every word capitalised. Use whole words — avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML). The naming conventions can be read over here:</p> <p><a href="http://www.orac...
9,121
<p>On the UNIX bash shell (specifically Mac OS X Leopard) what would be the simplest way to copy every file having a specific extension from a folder hierarchy (including subdirectories) to the same destination folder (without subfolders)?</p> <p>Obviously there is the problem of having duplicates in the source hierar...
<p>In bash:</p> <pre><code>find /foo -iname '*.txt' -exec cp \{\} /dest/ \; </code></pre> <p><code>find</code> will find all the files under the path <code>/foo</code> matching the wildcard <code>*.txt</code>, case insensitively (That's what <code>-iname</code> means). For each file, <code>find</code> will execute <c...
<p>As far as the man page for cp on a FreeBSD box goes, there's no need for a -t switch. cp will assume the last argument on the command line to be the target directory if more than two names are passed.</p>
4,726
<p>Came across this error today. Wondering if anyone can tell me what it means:</p> <blockquote> <blockquote> <p>Cannot sort a row of size 9522, which is greater than the allowable maximum of 8094.</p> </blockquote> </blockquote> <p>Is that 8094 bytes? Characters? Fields? Is this a problem joining multiple ta...
<p>In SQL 2000, the row limit is 8K bytes, which is the same size as a page in memory. </p> <p>[Edit]</p> <p>In 2005, the page size is the same (8K), but the database uses pointers on the row in the page to point to other pages that contain larger fields. This allows 2005 to overcome the 8K row size limitation.</p>
<p>That used to be a problem in SQL 2000, but I thought that was fixed in 2005.</p>
3,746
<p>I'm trying to print <a href="https://www.thingiverse.com/thing:4461654" rel="nofollow noreferrer">a gear for a robovac deal</a>.</p> <p>The issue I'm having is with gaps between the walls of the top part of the gear. It needs to have the corners filled to provide stability or else the tabs easily snap. I've tried ad...
<p>The problem isn't Cura, rather its the precision of the 3D model. If parts of the model is smaller than the line width the model cannot be printed. A solution to this would be to increase the thickness of the cylinder, decrease the size of the square or reduce the line width to allow that region to be properly fabri...
<p>You can fix it by changing <strong>Experimental</strong> &gt; <strong>Slicing Tolerance</strong> &gt; <strong>Exclusive</strong></p> <p><a href="https://i.stack.imgur.com/htVjk.jpg" rel="nofollow noreferrer" title="Cura screenshot of a model with the Slicing tolerance set to Middle"><img src="https://i.stack.imgur.c...
1,802
<p>I have been working hard the last year on the model below. I am new to everything 3D that is modeling and especially 3D printing. I have however successfully concluded quite a good number of 3D prints which I created in blender with my Creality Ender 3 Pro so I have a bit of experience.</p> <p>All this new experien...
<p>Basically you need to write a G-code file yourself. This is a plain text file with a <code>.g</code> extension.</p> <p>You need to home the printer with <code>G28</code>, then move the Y axis all the way forward (for a Prusa style printer) with <code>G1 F1500 Y{ymax}</code> (where <code>{ymax}</code> is the length ...
<p>Never mind, figured the quickest dirtiest way myself - created a tall thin cylinder shape model in Blender and positioned it in Repetier so the printer head will be clear of the table as it moves. Then just broke off the filament that was currently in the printer so it will stop feeding once the current piece gets t...
1,648
<p>I've had issues with my hot end and decided to replace the whole assembly with <a href="https://www.amazon.ca/Ewigkeit-Extruder-Printer-Assembled-Aluminum/dp/B07Q493RYW/ref=sr_1_4_sspa?keywords=hot%20end&amp;qid=1574768751&amp;sr=8-4-spons&amp;psc=1&amp;spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFYVDRSMjVZRDU3QkMmZW5jcnlwdGVkSW...
<p>I got my printer fixed and am posting steps I took for people with similar problems in the future. </p> <p><strong>Initial problem:</strong></p> <p>After I replaced my entire heating unit and reconnected the wires, my printer started to read about 135/185 °C for the nozzle and bed at room temperature. It gives the...
<p>For future readers,</p> <p>On a second-hand 3D printer with unknown firmware, I compiled the Marlin 2.1.1 firmware for the Creality 4.2.7 board with the default configurations for the <code>BOARD_CREALITY_V427</code> board, and at room temperature, the hotend reads about 121 °C.</p> <p>I then measured the hotend the...
1,523
<p>As a project manager, you are required to organize time so that the project meets a deadline.</p> <p>Is there some sort of equations to use for estimating how long the development will take?</p> <p>let's say the database</p> <p><code>time = sql storedprocedures * tables manipulated or something similar</code></p>...
<p>As project manager you have to remember that the best you will ever we be able to do <em>on your own</em> is give your best guess as to how long a given project will take. How accurate you are. depends on your experience and the scope of the project.</p> <p>The only way I know of to get a reasonably accurate estima...
<p>There will be such a formula as soon as computers can start generating <em>all</em> code themselves. Until then you are stuck with human developers who all have different levels of skill and development speed.</p>
6,596
<p>It's something that's bugged me in every language I've used, I have an if statement but the conditional part has so many checks that I have to split it over multiple lines, use a nested if statement or just accept that it's ugly and move on with my life.</p> <p>Are there any other methods that you've found that mig...
<p>Separate the condition in several booleans and then use a master boolean as the condition.</p> <pre><code>bool isOpaque = object.Alpha == 1.0f; bool isDrawable = object.CanDraw &amp;&amp; object.Layer == currentLayer; bool isHidden = hideList.Find(object); bool isVisible = isOpaque &amp;&amp; isDrawable &amp;&amp;...
<p>If you do this:</p> <pre><code>if (var1 == true) { if (var2 == true) { if (var3 == true) { ... } } } </code></pre> <p>Then you can also respond to cases where something isn't true. For example, if you're validating input, you could give the user a tip for how to properly format ...
2,793
<p>Assuming you have a suitable oven to maintain temperature at the filament melting point and a suitable mold that can handle the temperature, is a commodity 3D printer hotend and extruder, with large nozzle, suitable for injecting material into the mold? I'm thinking of a setup like having the hotend mounted through ...
<p>Injection molding requires two major components: pressure and heat. So your question can be broken down into those two halves: can your average extruder handle injection molding temperatures, and can it handle injection molding pressures?</p> <p><strong>Let's start with pressure.</strong> Per <a href="http://www.me....
<p>An injection molding injector melts all the plastic needed for the shot and pushes it into the mold and through the sprue very quickly. Perhaps that is why it is called a "shot".</p> <p>Injection molding machines do not heat the mold to plastic-melting temperatures. This works because the plastic is injected quic...
1,332
<p>Does a new <code>SessionFactor</code>y and <code>Session</code> object have to be created for each database? I have a data store for my application data, and a separate data store for my employee security, which is used to validate users. Do I have to create a new SessionFactory ans Session object for calls to the 2...
<p>ok so this doesn't answer your question directly but it might offer an insight as to why you should create multiple session objects for each datastore.</p> <p><a href="http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx" rel="nofollow noreferrer">This article</a> explains how you can implement a...
<h1>General case</h1> <p>The general case answer is no, you need at least different sessions for the general case.</p> <p>You may use a single session factory by using the <code>OpenSession</code> overload taking an opened connection as argument, allowing you to switch database for the session requiring it.</p> <p>T...
8,055
<p>I've written a Python package that includes a bsddb database of pre-computed values for one of the more time-consuming computations. For simplicity, my setup script installs the database file in the same directory as the code which accesses the database (on Unix, something like /usr/lib/python2.5/site-packages/mypa...
<p>Try using pkg_resources, which is part of setuptools (and available on all of the pythons I have access to right now):</p> <pre><code>&gt;&gt;&gt; import pkg_resources &gt;&gt;&gt; pkg_resources.resource_filename(__name__, "foo.config") 'foo.config' &gt;&gt;&gt; pkg_resources.resource_filename('tempfile', "foo.conf...
<p>That's probably the way to do it, without resorting to something more advanced like using setuptools to install the files where they belong.</p> <p>Notice there's a problem with that approach, because on OSes with real a security framework (UNIXes, etc.) the user running your script might not have the rights to acc...
6,015
<p>Dear experts and 3D printer users;</p> <p>I am a beginner in 3D printing field. I read couple of answers in forums and i cannot find exact answer to my problem. </p> <p>Printing quality dropped when i try to write vertical axis (i mean, columns). There is no problem in horizontal axis. </p> <p>My column width mus...
<p><strong>The main problem with your setup is the nozzle width</strong>. It is simply too big to accurately print a structure that tiny. An integral part of the filament deposition is the "smearing" of the molted plastic, that clearly can't happen if the structure is about the same size of the nozzle bore. Also the...
<p>You cannot hope to print 0.5mm columns with a 0.4mm print head successfully using an FDM printer. Basically, you are asking the printer to lay down tiny blobs of filament, one of top of another. You have two options:</p> <ol> <li><p>Use a finer nozzle (e.g. 0.1mm). However, such nozzles are reported as being very d...
798
<p>How do I do backups in MySQL? </p> <p>I'm hoping there'll be something better than just running mysqldump every "x" hours.</p> <p>Is there anything like SQL Server has, where you can take a full backup each day, and then incrementals every hour, so if your DB dies you can restore up to the latest backup?</p> <p>...
<p>You might want to look at <a href="http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html" rel="noreferrer">incremental backups</a>.</p>
<p>@Daniel,</p> <p>in case you are still interested, there is a newish (new to me) solution shared by <a href="http://capttofu.livejournal.com/" rel="nofollow noreferrer">Paul Galbraith</a>, a tool that allows for online backup of innodb tables called <a href="http://www.innodb.com/hot-backup/" rel="nofollow noreferre...
6,870
<p>I have some code like this:</p> <pre><code>If key.Equals("search", StringComparison.OrdinalIgnoreCase) Then DoSomething() End If </code></pre> <p>I don't care about the case. Should I use <code>OrdinalIgnoreCase</code>, <code>InvariantCultureIgnoreCase</code>, or <code>CurrentCultureIgnoreCase</code>?</p>
<p><strong><a href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/best-practices-strings#choosing-a-stringcomparison-member-for-your-method-call" rel="noreferrer">Newer .Net Docs now has a table to help you decide which is best to use in your situation.</a></strong></p> <p>From MSDN's "<a href="https://...
<p>The very simple answer is, unless you are using Turkish, you don't need to use InvariantCulture.</p> <p>See the following link:</p> <p><a href="https://stackoverflow.com/questions/3550213/in-c-sharp-what-is-the-difference-between-toupper-and-toupperinvariant">In C# what is the difference between ToUpper() and ToUp...
9,832
<p>Are there any good solutions to represent a parameterized enum in <code>C# 3.0</code>? I am looking for something like <a href="http://www.ocaml.org" rel="nofollow noreferrer">OCaml</a> or <a href="http://www.haxe.org" rel="nofollow noreferrer">Haxe</a> has. I can only think of class hierarchy with a simple enum fie...
<p>Not being familiar with OCaml or Haxe, and not being clever enough to understand the other explanations, I went and looked up the <a href="https://haxe.org/manual/types-enum-instance.html" rel="nofollow noreferrer">Haxe enum documentation</a> - the 'Enum Type Parameters' bit at the bottom seems to be the relevant pa...
<p>C# (the .NET framework in general, as far as I know) doesn't support parametrized enums like Java does. That being said, you might want to look at Attributes. Some of the features that Java enums are capable of are somewhat doable through Attributes.</p>
9,237
<p>I currently use <a href="http://subversion.tigris.org/" rel="nofollow noreferrer">subversion</a> for my version control via <a href="http://ankhsvn.open.collab.net/" rel="nofollow noreferrer">AhnkSVN</a> and Visual Studio. I recently started using <a href="http://www.codeplex.com/treesurgeon" rel="nofollow noreferr...
<p>You could use <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET" rel="nofollow noreferrer">CruiseControl.Net</a>, which can do a build on every check in, nightly builds, or however you want to do it. A quick google search suggests CC.Net has some <a href="http://ccnet.sou...
<p>You might want to consider CI-Factory. It's a continuous integration environment builder that uses CruiseControl.NET and a dozen other tools. There's an excellent screencast here: <a href="http://www.dnrtv.com/default.aspx?showID=64" rel="nofollow noreferrer">http://www.dnrtv.com/default.aspx?showID=64</a></p>
5,718
<p>The table doesn't have a last updated field and I need to know when existing data was updated. So adding a last updated field won't help (as far as I know).</p>
<p>SQL Server 2000 does not keep track of this information for you. </p> <p>There may be creative / fuzzy ways to guess what this date was depending on your database model. But, if you are talking about 1 table with no relation to other data, then you are out of luck.</p>
<p>You can add a timestamp field to that table and update that timestamp value with an update trigger.</p>
2,495
<p>The <code>printf</code> function takes an argument type, such as <code>%d</code> or <code>%i</code> for a <code>signed int</code>. However, I don't see anything for a <code>long</code> value.</p>
<p>Put an <code>l</code> (lowercased letter L) directly before the specifier. </p> <pre><code>unsigned long n; long m; printf("%lu %ld", n, m); </code></pre>
<p>I think to answer this question definitively would require knowing the compiler name and version that you are using and the platform (CPU type, OS etc.) that it is compiling for.</p>
5,944
<p>Do we need mold release agent in 3D printing mold? If it is not used, what effect will it have on the product?</p>
<p>It seems I misread your question. </p> <h2>3D Printed Mold</h2> <p>You were asking about (or the question now states) use of a mold release compound to prevent a molded part from sticking to a 3d print mold.</p> <p>Yes. It is always beneficial for the molded part to not stick to the mold. Easy separation and p...
<p>Welcome to the 3D Printing Stack Exchange site.</p> <h2>Used in Casting</h2> <p>A mold release agent is commonly used when a part is cast. The release agent is placed on the inside of the mold before the liquid object is added. As the object becomes solid, the release agent prevents the object from adhering to t...
1,459
<p>I save stuff in an <a href="http://msdn.microsoft.com/en-us/library/3ak841sy.aspx" rel="nofollow noreferrer">Isolated Storage</a> file (using class IsolatedStorageFile). It works well, and I can retrieve the saved values when calling the saving and retrieving methods in my <a href="http://en.wikipedia.org/wiki/Data_...
<p>When you instantiated the IsolatedStorageFile, did you scope it to IsolatedStorageScope.Machine?</p> <p>Ok now that you have illustrated your code style and I have gone back to retesting the behaviour of the methods, here is the explanation:</p> <ul> <li>GetMachineStoreForAssembly() - scoped to the machine and the...
<p>When you are saving, you are calling GetMachineStoreForDomain, but when you are retrieving, you are calling GetMachineStoreForAssembly.</p> <p>GetMachineStoreForAssembly is scoped to the assembly that the code is executing in, while the GetMachineStoreForDomain is scoped to the currently running AppDomain and the a...
9,825
<p>Do I need to register new extension types with Apple before I release an application that would create them on OS X?</p>
<p>No, there's no need to register extensions.</p>
<p>As a follow up, there is a little more information in the FAQs at the Apple Developer Connection (ADC) website:</p> <p><a href="http://developer.apple.com/faq/datatype.html" rel="nofollow noreferrer">http://developer.apple.com/faq/datatype.html</a></p>
6,197
<p>The company I'm currently working for is using <a href="http://selenium.openqa.org/" rel="noreferrer">Selenium</a> for Uniting-Testing our User Interface. What do you use to Unit-Test your Web UI and how effective do you find it? </p>
<p>We use Watin at my place of employment, we are a .net shop so this solution made a lot of sense. We actually started with Watir (the original ruby implementation) and switched after. It's been a pretty good solution for us so far</p>
<p>We use <a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WatiN</a> for system testing, and <a href="http://docs.jquery.com/QUnit" rel="nofollow noreferrer">QUnit</a> for JavaScript unit testing.</p>
2,898
<p>I'm writing a Telnet client of sorts in C# and part of what I have to parse are ANSI/VT100 escape sequences, specifically, just those used for colour and formatting (detailed <a href="http://www.termsys.demon.co.uk/vtansi.htm#colors" rel="noreferrer">here</a>).</p> <p>One method I have is one to find all the codes ...
<p>The reason why #1 is slower is that [\d;]+ is a greedy quantifier. Using +? or *? is going to do lazy quantifing. See <a href="http://msdn.microsoft.com/en-us/library/3206d374(VS.80).aspx" rel="nofollow noreferrer">MSDN - Quantifiers</a> for more info.</p> <p>You may want to try:</p> <pre><code>"(\e\[(\d{1,2};)*?[...
<p>Without doing detailed analysis, I'd guess that it's faster because of the question marks. These allow the regular expression to be "lazy," and stop as soon as they have enough to match, rather than checking if the rest of the input matches.</p> <p>I'm not entirely happy with this answer though, because this mostly...
2,685
<p>I'm developing a multi-threaded app for a Linux embedded platform.</p> <p>At the moment I'm setting the stack size for each thread (via pthread_set_attr) to a fairly large default value. I would like to fine tune that value for each thread to something smaller to reduce my application's memory usage. I could go thr...
<p>Here are two tools that measure (native pthreads) stack usage in Linux applications:</p> <ul> <li><a href="http://valgrind.org" rel="nofollow noreferrer" title="Valgrind">Valgrind</a></li> <li><a href="https://github.com/d99kris/stackusage" rel="nofollow noreferrer" title="stackusage">Stackusage</a></li> </ul> <p>...
<p>I do not know any good tools but as last resort you could include some code in your application to check it, similar to the following:</p> <pre><code>__thread void* stack_start; __thread long stack_max_size = 0L; void check_stack_size() { // address of 'nowhere' approximates end of stack char nowhere; void* ...
8,299
<p>I want to make an anime-style figurine in Blender with long strands of wavy hair coming down from pigtails, similar to sailor moon, but more so.</p> <p>They are going to be extremely challenging to print in place as they will be very thin and difficult to support.</p> <p>Would it be possible simply to print long fla...
<p>Yes, printing a flat strand structure and then shaping it using heat to form hair is something people already do, for example with the <a href="https://www.thingiverse.com/thing:2007221" rel="nofollow noreferrer">Hairy Lion model</a>.</p>
<p>YES you can reshape printed PLA with heat.</p> <p>I have a bin for all my brim/cleanup offcuts, stored at the printer. When it gets a bit full I simply blast it with my hot-air gun normally used for finishing prints. This shrinks the wispy bits, and thicker parts soften and droop down under their own weight.</p> <...
2,064
<p>First of all, I'm quite new to 3D printing. After printing some temperature towers, stringing and bridging tests, I wanted to print the Bechys to see everything working together. I'm getting some strange &quot;bumps&quot; in the outer walls. It looks like for 2-3 layers, the filament gets lifted up.</p> <p><a href="...
<p>There are a few issues that could cause this. Roughness in your z-axis lead screw as pointed out by @TheLamestUsername is a leading contender I would say. I'd also extended that answer to include checking the belts for your X and Y axes as well as making sure that the rods the gantry slide on are smooth since the fa...
<p>The fact that the bumps were in the same spots on multiple occasions points to z-axis problems. Turn your printer off and manually turn the z-axis all the way from bottom to top. If there are any tight spots, there is some <em>z-axis binding</em>. If there are no tight spots, skip to the last paragraph.</p> <p>Try t...
1,688
<p>A few minutes after finishing a print job, the filament is solidified in the nozzle and the nozzle-throat. When I start another print job a while later, the filament is not sufficiently melted and the nozzle is obstructed. Do I need to clean the nozzle after every print job ? or is there a practical method to overco...
<p>Cooling any single face of the motor is fine. The motor case conducts heat <em>very</em> well. Many 3d printers effectively cool the motors merely by having the output drive face of the motor bolted to a metal bracket which is bolted to the aluminum extrusion frame. That's it. That contact alone cools the motor, whi...
<p>Your solution will not cool all sides effectively. Firstly don't use zip ties; get thermal tape.</p> <p><a href="https://i.stack.imgur.com/uC6tD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uC6tD.jpg" alt="Thermal Tape"></a> (<a href="https://rads.stackoverflow.com/amzn/click/com/B00QSHPH8E" r...
1,452
<p>I have a directory structure like the following;</p> <blockquote> <p>script.php</p> <p>inc/include1.php<br/> inc/include2.php</p> <p>objects/object1.php<br/> objects/object2.php</p> <p>soap/soap.php</p> </blockquote> <p>Now, I use those objects in both <code>script.php</code> and <code>/soap/s...
<p>This should work </p> <pre><code>$root = realpath($_SERVER["DOCUMENT_ROOT"]); include "$root/inc/include1.php"; </code></pre> <hr> <p><strong>Edit:</strong> added imporvement by <a href="https://stackoverflow.com/questions/4369/include-files-requiring-an-absolute-path#4388">aussieviking</a></p>
<blockquote> <blockquote> <p>@Flubba, does this allow me to have folders inside my include directory? flat include directories give me nightmares. as the whole objects directory should be in the inc directory.</p> </blockquote> </blockquote> <p>Oh yes, absolutely. So for example, we use a single layer of subfo...
2,638
<p>I am currently working through various different iterations ofccreating a propeller for a model ICE (nitro engine). So far I have managed to disintegrate each of them eventually. I have been experimenting mostly with PLA and PETG so far. I am currently thinking about using carbon-infused PLA or using PC (I found one...
<p>As Kezat noted, your part has very low infill, but infill is not what provides most of the part strength anyway. From what I can see of the broken part, it looks like you only have 1 or at most 2 walls, and these are what contribute most to part strength, especially in the orientation you're working in.</p> <p>You s...
<p>For safety on a project like this, it's best to have a self-contained chamber to run a life test until the propeller falls apart. Once a material and design has a reasonable lifetime, then you could use the print.</p> <p>Reputable propeller manufacturers will already do this. They may even run a shorter burn-in te...
2,005
<p>I am in a position where I can choose the client browser for my web app. The app is being used internally, and we are installing each client "manually".I would like to find a better solution for the browser,so :</p> <p>What is a good browser that I can use as a client to a web application?</p> <p>General functiona...
<p><a href="http://developer.mozilla.org/en/Prism" rel="noreferrer">Mozilla Prism</a> seems ideal for your purposes.</p> <p>It shares code with Firefox but is designed to run web applications without the usual Browser interface to make them appear more like desktop applications. So no back button or address bar to wo...
<p>When you run into serious issues, with Firefox you can trace it down to the code and maybe get someone to fix it. With IE, you can't.</p>
5,916
<p>I have the following code snippet.</p> <pre><code>$items['A'] = "Test"; $items['B'] = "Test"; $items['C'] = "Test"; $items['D'] = "Test"; $index = 0; foreach($items as $key =&gt; $value) { echo "$index is a $key containing $value\n"; $index++; } </code></pre> <p>Expected output:</p> <pre><code>0 is a A c...
<p>Your $index variable there kind of misleading. That number isn't the index, your "A", "B", "C", "D" keys are. You can still access the data through the numbered index $index[1], but that's really not the point. If you really want to keep the numbered index, I'd almost restructure the data:</p> <pre> $items[] = arra...
<p>Be careful how you're defining your keys there. While your example works, it might not always:</p> <pre><code>$myArr = array(); $myArr[A] = "a"; // "A" is assumed. echo $myArr['A']; // "a" - this is expected. define ('A', 'aye'); $myArr2 = array(); $myArr2[A] = "a"; // A is a constant echo $myArr['A']; // error...
9,410
<p>How can I pipe the new password to smbpasswd so I can automate my installation process.</p>
<p>Thanks to Mark I found the answer:</p> <pre><code>(echo newpassword; echo confirmNewPassword) | smbpasswd -s </code></pre> <p>BTW: (echo oldpasswd; echo newpasswd) | smbpasswd -s does not work.</p>
<p>using either <a href="http://en.wikipedia.org/wiki/Pipeline_(Unix)" rel="nofollow noreferrer">pipelines</a> or <a href="http://en.wikipedia.org/wiki/Redirection_(Unix)" rel="nofollow noreferrer">redirection</a>.</p>
3,312
<p>I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jQuery 1.2.6, but intellisense will not work in a separate jscript file. I have the jQuery library referenced first on my web page in the &lt;head> tag. Am I doing anything wrong?</p>
<p>At the top of your external JavaScript file, add the following:</p> <pre><code>/// &lt;reference path="jQuery.js"/&gt; </code></pre> <p>Make sure the path is correct, relative to the file's position in the folder structure, etc.</p> <p>Also, any references need to be at the top of the file, before <em>any</em> ot...
<p>Make sure you're not using a minimized jQuery file.</p> <p>Use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>J</kbd> to make it work after adding JavaScript files to the project.</p>
8,446
<p>what is the best method for inter process communication in a multithreaded java app.</p> <p>It should be performant (so no JMS please) easy to implement and reliable,so that objects &amp; data can be bound to one thread only?</p> <p>Any ideas welcome!</p>
<p>Could you clarify a bit? Do you mean IPC in a single JVM? (Multiple threads, yes, but at an OS-level only one process.) Or do you mean multiple JVMs? (And truly OS-level inter process communications.)</p> <p>If it is the first, then maybe something out of <strong>java.util.concurrent</strong>, like <a href="http...
<p>I recommend looking into the entire <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html" rel="nofollow noreferrer">java.util.concurrent</a> package, which have multiple classes for dealing with concurrency and different communication means between threads. All depends on what y...
7,450
<p>I am using SourceForge for some Open Source projects and I want to automate the deployment of releases to the SourceForge File Release System. I use Maven for my builds and the standard SFTP deployment mechanism doesn't seem to work unless you do some manual preparation work. I have come across some old postings on ...
<p>I'm not able to test this to confirm, but I believe it is possible without writing any plugins.</p> <p>You can <a href="http://sourceforge.net/apps/trac/sourceforge/wiki/SCP" rel="noreferrer">deploy to SourceForge using SCP</a>, and the maven-deploy-plugin can be configured to <a href="http://maven.apache.org/plugi...
<p>The Maven SourceForge plug-in does not work with Maven 2. Also I believe this plug-in uses FTP which is no longer supported.</p>
3,722
<p>I am working on a C++ code base that was recently moved from X/Motif to Qt. I am trying to write a Perl script that will replace all occurrences of Boolean (from X) with bool. The script just does a simple replacement. </p> <pre><code>s/\bBoolean\b/bool/g </code></pre> <p>There are a few conditions. </p> <p>...
<blockquote> <p>s/[^:]\bBoolean\b(?!")/bool/g</p> </blockquote> <p>This does not match strings where Boolean is at that the beginning of the line becuase [^:] is "match a character that is not :".</p>
<p>To fix condition 1 try:</p> <pre><code>s/[^:]\bBoolean\b(?!")/bool/g </code></pre> <p>The [^:] says to match any character other than ":". </p>
5,560
<p>Is it possible to read a disk directly with .NET? By directly, I mean via the device bypassing the file system. I think I would go about this by opening the device some way &quot;\Device\Ide\IdeDeviceP2T0L0-1&quot; for example.</p> <p>If I can't open the device with a .NET API, knowing which Win32 API to use would...
<p><a href="http://msdn.microsoft.com/en-us/library/aa363858.aspx" rel="noreferrer">CreateFile</a> has support for direct disk access. Read the notes under "Physical Disks and Volumes". You should be able to P/Invoke the call.</p> <p>Note that Vista and Server 2008 have <a href="http://support.microsoft.com/kb/942448"...
<p>In .NET 5, you can use the FileStream method to read a file on the disk.</p> <pre><code>new FileStream(@&quot;\\.\PhysicalDrive1&quot;, FileMode.Open, FileAccess.Read, FileShare.ReadWrite) </code></pre>
5,909
<p>I printed a case for my phone, a Motorola G4 Plus. I found the model of the casing on <a href="https://www.thingiverse.com/thing:2482011" rel="nofollow noreferrer">Thingiverse</a></p> <p>I just downloaded the model, used Meshmixer to check for issues, after that, opened Simplify3d and saved it for printing using an...
<p>In short: Not really.</p> <p>longer version: It depends.</p> <p>The main culprit of losing details in this case would be the weight and speed of the thing moving. So if you have a heavy X-axis carriage, acceleration and decelerating the carriage won't be instant. Same with the bed (Y-axis).</p> <p>Another culprit...
<p>I'm under the impression that your question hints on rectilinear motion by aligning the print part to the axes motion of the printer. So, placing it under 45&deg; would suggest movement of both steppers to make a straight line opposed to one stepper movement for a straight line.</p> <p>Basically, the weight of the ...
1,302
<p>I have downloaded a font that looks less than desirable if it is not anti-aliased. I can not figure out how to enable anti-aliasing in VS, I have changed the 'Smooth Edges of Screen Fonts' in the system performance options but that does not seem to help.</p> <p>VS2008 on XP SP3.</p> <p>What am I missing?</p>
<p>Try using ClearType, not Standard font smoothing. </p> <p>It's in Display properties, Appearance, Effects.</p>
<p>Could it be a problem with the color combination? Some fonts look really ugly on high contrast combinations with a black background.</p> <p>Also, can you see the difference in the fonts in any other application?</p> <p>Which font is it?</p>
6,647
<p>Header, footer and sidebars have fixed position. In the center a content area with both scroll bars. No outer scroll bars on the browser. I have a layout that works in IE7 and FF. I need to add IE6 support. How can I make this work?</p> <p>Here is an approximation of my current CSS.</p> <pre class="lang-html prettyp...
<p>Might be overkill for your project, but <a href="http://dean.edwards.name/IE7/" rel="noreferrer">Dean Edwards' IE7 javascript adds support for fixed positioning to IE6</a>.</p>
<p>Try IE7.js. Should fix your problem without having to make any modifications.</p> <p>Link: <a href="http://code.google.com/p/ie7-js/" rel="nofollow noreferrer">IE7.js</a></p>
5,027
<p>I am working on a collection of classes used for video playback and recording. I have one main class which acts like the public interface, with methods like <code>play()</code>, <code>stop()</code>, <code>pause()</code>, <code>record()</code> etc... Then I have workhorse classes which do the video decoding and video...
<p>I would be a bit reluctant to use nested classes here. What if you created an abstract base class for a "multimedia driver" to handle the back-end stuff (workhorse), and a separate class for the front-end work? The front-end class could take a pointer/reference to an implemented driver class (for the appropriate m...
<p>One reason to avoid nested classes is if you ever intend to wrap the code with swig (<a href="http://www.swig.org" rel="nofollow noreferrer">http://www.swig.org</a>) for use with other languages. Swig currently has problems with nested classes, so interfacing with libraries that expose any nested classes becomes a r...
2,282
<p>This question is kind of an add-on to this <a href="https://stackoverflow.com/questions/44905/c-switch-statement-limitations-why">question</a></p> <p>In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the select...
<p>Often times when you see the noise from a huge switch statement or many if statements that might fall into more than one block, you're trying to suppress a bad design.</p> <p>Instead, what if you implemented the Specification pattern to see if something matched, and then act on it?</p> <pre><code>foreach(MonthSpec...
<p>Write the switch cases in reverse order</p> <pre><code>case 2: case 1: case 0: break; default: </code></pre> <p>Hope that helps!</p>
7,554
<p>When I do a file search on eclipse it includes the <code>.svn</code> directories by default. I tried excluding them from the build path but they still appear on file search results.</p>
<p>Spaceman is right. With Helios, choose <code>Project -&gt; Properties -&gt; Resource -&gt; Resource Filters</code> and then add an <code>exclude</code> filter for type "Folder" with name <code>.svn</code>.</p>
<p>Click on the drop-down triangle in the top-right corner of the Navigator and choose "Filters..".</p> <p>By default Eclipse only offers you "<em>.class" and ".</em>".</p> <p>If you choose ".*" you'll hide .svn files. Obviously all other .something files will also be hidden.</p>
6,334
<p>I am building out a solution that will be deployed in multiple data centers in multiple regions around the world, with each data center having a replicated copy of data actively updated in each region. I will have a combination of multiple databases and file systems in each data center, the state of which must be ke...
<p>Lotus/ Domino is your answer. I've been working with it for ten years and its exactly what you need. It may not be trendy (a perception that I would challenge) but its powerful, adaptable and very secure, The latest version R8 is the best yet.</p>
<p>You dont give enough specifics to be certain of your needs but I think you should check out SQL Server Merge replication. It allows for asynchronous replication of multiple databases with full conflict resolution. You will need to designate a Global master and all the other databases will replicate to that one, but ...
9,172
<p>I know almost nothing about linq.</p> <p>I'm doing this:</p> <pre><code>var apps = from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) &amp;&amp; app.MainWindowHandle != IntPtr.Zero select app; </code></pre> <p>Which gets me all the running processes which match that criteria....
<p>@FryHard FirstOrDefault will work but remember that it returns null if none are found. This code isn't tested but should be close to what you want:</p> <pre><code>var app = Process.GetProcesses().FirstOrDefault(p =&gt; p.ProcessName.Contains("MyAppName") &amp;&amp; p.MainWindowHandle != IntPtr.Zero); if (app == nu...
<p>Assuming that in your first example apps is an IEnumerable you could make use of the .Count and .FirstOrDefault properties to get the single item that you want to pass to SetForegroundWindow.</p> <pre><code>var apps = from app in Process.GetProcesses() where app.ProcessName.Contains( "MyAppName" ) &amp;&amp; app.Ma...
2,904
<p>Can anyone point me to some decent introductions to WS-Security?</p> <p>I'm looking for tutorials or something that provide a fairly gentle introduction to the subject, though I don't mind if it assumes basic knowledge of web services and SOAP. Most of the stuff I've seen so far is very technical and you need a lot...
<p>I think the best introduction to the (any) subject are some good examples.<br> <a href="http://www.codeproject.com/KB/webservices/WS-Security.aspx" rel="nofollow noreferrer">This article</a> at codeProject gives a fairly easy to follow guide trough web service security for a .NET application.</p>
<p>You can find some good article on WS-Security and <a href="http://ws.apache.org/rampart/" rel="nofollow noreferrer">Apache Rampart</a> - the open source WS-Security implementation - in <a href="http://wso2.org/library" rel="nofollow noreferrer">WSO2 Online Library</a>.</p> <p><a href="http://wso2.org/downloads/wsf/...
2,916
<p>I can't seem to figure out a good way to do this, but it seems like it should be simple. I have an element that I want to <code>append a div</code> to. Then I have another element that I want to clone and shove into that intermediate div. Here's what I was hoping to do:</p> <pre><code>$("#somediv &gt; ul").after...
<p>Go the other way around and use <code>insertAfter()</code>.</p> <pre><code>$("&lt;div id='xxx'&gt;&lt;/div&gt;") .append($("#someotherdiv").clone()) .insertAfter("#somediv &gt; ul") </code></pre> <p>Try to add your generated DOM nodes to the document only after finishing your work.</p> <p>Once the nodes a...
<blockquote> <p>How can I most efficiently select that intermediate div that I added with the "after" and put my "#someotherdiv" into it?</p> </blockquote> <p>@Vincent's solution is probably the fastest way to get the same result. However if for whatever reason you need add the div with <code>after()</code> then nee...
7,853
<p>I'm in the process of building the <a href="http://www.thingiverse.com/thing:1001065" rel="nofollow noreferrer">D-Bot core XY</a> printer, and I was hoping to know if the Z-axis 'zero' is near the hot end or near the bottom of the printer furthest away from the hotend? In this printer the Z-platform moves up and dow...
<p>Generally, Z-axis zero is when the hot end and the build plate are close to each other. Some printers keep the hot end up at the top, and bring the build plate up to reach it. Other printers keep the build plate at the bottom, and lower the hot end down to reach it. As such, "Z axis zero" doesn't specify top or b...
<p>Yes, Z-Zero is typically at the "top" of the printer, closest to the nozzle(s). X and Y zeros are also typically in the lower-left corner of the buildplate.</p> <p>However, the XY zeros are re-interpreted in slicing software to produce cleaner G-Code as it's sometimes difficult to read G-Code in negative coordinate...
456
<p>I'm attemping my first print where I pause the print, change the filament, and resume to achieve a two-color print. My first attempt failed when the printer resumed printing over a centimeter away from where it should have on the X axis. My second attempt was much better, but still resumed about 1.5mm off-target.<...
<p>You are out of luck:</p> <p>Print gcode is written in relative coordinates. If you move the printhead manually, the printer does not know this, and will just follow its relative path from the new position - which is what commonly is called layer-shifting.</p> <p>To try to mitigate this, there are ways, but they ar...
<p>You may have moved the nozzle in the X or Y direction a bit. Instead of resuming right away (that is, after step 5), send it to the X/Y home.</p> <p>Additionally, if you have a removable build plate like in Prusas, you can remove the print, send the model to the X/Y/Z home, raise the nozzle very high, then replace ...
1,128
<p>I'm losing my mind, it all started out with the idea of a project where I want an abstract shape (I'm going to call it a stretched cube with an angle), now I know a bit of Vectorworks - a 3D/Architecture drawing program. I found nothing in all the tutorials how to make something low poly but still be able to for exa...
<p>Yes, you can accomplish threading easily with something like 3Ds Max, Blender, Maya etc. I use Maya personally so, in Maya, all you have to do is:</p> <ol> <li>Create a cylinder. This will be the main body of your 'screw'.</li> <li>To make the thread, you need to create a helix primitive. You can edit the number of...
<p>I've had my share of struggles with the issues you're having - bridging the software gap between hard-edge, parametric modeling tools (typically CAD) and more free-form, 'soft'/organic, modeling tools. It's not a trivial task to work across both domains simultaneously.</p> <p>The simplest workflow I've developed is...
259
<p>I am currently learning OLAP &amp; MDX after many years of relational database development. </p> <p>Any tips on getting started in MDX? What are the best books and resources to learn MDX?</p>
<p>A classic, albeit a bit dated, book is <a href="https://rads.stackoverflow.com/amzn/click/com/1846281741" rel="nofollow noreferrer" rel="nofollow noreferrer">Fast Track to MDX</a>. It's a great overview and a quick read, though it doesn't cover the new MDX features of SQL Server 2005.</p> <p>The Spofford book <a hre...
<p>We used the LearnItFirst.com training videos and found them to be a very thorough introduction to SSAS and MDX. There are around 40 hours of content plus exercises including around 6 hours of pure MDX Training.</p> <p>The details for the SSAS Course can be found at: <a href="http://www.learnitfirst.com/Course/165/...
4,461
<p>My new Ender 5 Plus' Bowden tube keeps popping out of its socket on the extruder mid-print, I've tried several times and it keeps doing it even though it's locked into place securely at the start every time. Is this a known issue? And how do I resolve it?</p> <p>I just got it so I doubt it's the coupler, I replaced ...
<p>The coupler for the Bowden tube is probably worn out or the tube end has been scraped so that the coupler can't grab it or you have left out the clamp on the coupler.</p> <p>The coupler has a sleeve that when pressed down releases the Bowden tube. There is a C-shaped clip that should go between the top lip of the s...
<p>OK well I feel silly, it turns out it wasn't fully pushed into place, I pushed it in feeling it lock and thought it was secure, when it actually wasn't, pushing it in till it feels locked up twice resulted in it being properly secured. (sorry if my description doesn't make a lot of sense, I'm not good at that kind o...
2,066
<p>In my Servlet I would like to access the root of the context so that I can do some JavaScript minifying.</p> <p>It would be possible to do the minify as part of the install process but I would like to do it on Servlet startup to reduce the implementation cost.</p> <p>Does anyone know of a method for getting the co...
<p>This should give you the real path that you can use to extract / edit files.</p> <p><a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)" rel="noreferrer">Javadoc Link</a></p> <p>We're doing something similar in a context listener.</p> <pre><code>p...
<p>Do you mean:</p> <pre><code>public class MyServlet extends HttpServlet { public void init(final ServletConfig config) { final String context = config.getServletContext(); ... } ... } </code></pre> <p>Or something more complex?</p>
8,182
<p>I've got some (C#) code that relies on today's date to correctly calculate things in the future. If I use today's date in the testing, I have to repeat the calculation in the test, which doesn't feel right. What's the best way to set the date to a known value within the test so that I can test that the result is a k...
<p>My preference is to have classes that use time actually rely on an interface, such as</p> <pre><code>interface IClock { DateTime Now { get; } } </code></pre> <p>With a concrete implementation</p> <pre><code>class SystemClock: IClock { DateTime Now { get { return DateTime.Now; } } } </code></pre> <p>The...
<p>Have you considered using conditional compilation to control what happens during debug/deployment?</p> <p>e.g.</p> <pre><code>DateTime date; #if DEBUG date = new DateTime(2008, 09, 04); #else date = DateTime.Now; #endif </code></pre> <p>Failing that, you want to expose the property so you can manipulate it, this...
6,528
<p>Given a controller method like: </p> <pre><code>def show @model = Model.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml =&gt; model } end end </code></pre> <p>What's the best way to write an integration test that asserts that the return has the expected...
<p>A combination of using the format and assert_select in an integration test works great:</p> <pre><code>class ProductsTest &lt; ActionController::IntegrationTest def test_contents_of_xml get '/index/1.xml' assert_select 'product name', /widget/ end end </code></pre> <p>For more details check out <a href...
<p>Set the request objects accept header:</p> <pre><code>@request.accept = 'text/xml' # or 'application/xml' I forget which </code></pre> <p>Then you can assert the response body is equal to what you were expecting</p> <pre><code>assert_equal '&lt;some&gt;xml&lt;/some&gt;', @response.body </code></pre>
8,431
<p>We are trying to implement a REST API for an application we have now. We want to expose read/write capabilities for various resources using the REST API. How do we implement the "form" part of this? I get how to expose "read" of our data by creating RESTful URLs that essentially function as method calls and return t...
<p>There are many different alternatives you can use. A good solution is provided at the <a href="http://microformats.org/wiki/rest/urls" rel="nofollow noreferrer">microformats wiki</a> and has also been referenced by the RESTful JSON crew. As close as you can get to a standard, really.</p> <pre><code> Operate on a Re...
<p>The load should just be a normal GET request, and the saving of new data should be a POST to the URL which currently has the data...</p> <p>For example, load the current data from <a href="http://www.example.com/record/matt-s-example" rel="nofollow noreferrer">http://www.example.com/record/matt-s-example</a> and th...
6,804
<p>I have been searching around on google and not found any answers to this dilemma. I am using a Prusa I3 printer with PLA, trying to print horseshoes for the company I work for. They are for model horses, so quality is fairly important. I seem to have gotten all the settings dialed in just the way I want them and for...
<p>It could very well be that your print speed is too high (starting from the 2nd layer) for the motors to keep up comfortably. Try reducing the print speed to perhaps 75-80% of what you are using to see if it addresses the issue. You should also check you model to make sure there are errors in the STL. Sometimes such ...
<p>Is that printed on to tape? It looks <em>very</em> uneven. I'm guessing this is general bad adhesion and its just showing up best when going around curves. If you print onto tape, try putting it down with a squeegee, so it's absolutely flat and level with no creases or bubbles.</p> <p>I've personally had very littl...
862
<p>I want to setup a cron job to rsync a remote system to a backup partition, something like:</p> <pre><code>bash -c 'rsync -avz --delete --exclude=proc --exclude=sys root@remote1:/ /mnt/remote1/' </code></pre> <p>I would like to be able to "set it and forget it" but what if <code>/mnt/remote1</code> becomes unmounte...
<pre><code>if cut -d' ' -f2 /proc/mounts | grep '^/mnt/remote1$' &gt;/dev/null; then rsync -avz ... fi </code></pre> <p>Get the list of mounted partitions from <code>/proc/mounts</code>, only match <code>/mnt/remote1</code> (and if it is mounted, send grep's output to <code>/dev/null</code>), then run your <code>r...
<p>I am skimming This but I would think you would rather rsync -e ssh and setup the keys to accept the account.</p>
4,699
<p>I am using LINQ to query a generic dictionary and then use the result as the datasource for my ListView (WebForms).</p> <p>Simplified code:</p> <pre><code>Dictionary&lt;Guid, Record&gt; dict = GetAllRecords(); myListView.DataSource = dict.Values.Where(rec =&gt; rec.Name == "foo"); myListView.DataBind(); </code></p...
<p>Try this:</p> <pre><code>var matches = dict.Values.Where(rec =&gt; rec.Name == "foo").ToList(); </code></pre> <p>Be aware that that will essentially be creating a new list from the original Values collection, and so any changes to your dictionary won't automatically be reflected in your bound control.</p>
<p>Just adding knowledge the next sentence doesn´t recover any data from de db. Just only create the query (for that it is iqueryable type). For launching this query you must to add .ToList() or .First() at the end.</p> <pre><code>dict.Values.Where(rec =&gt; rec.Name == "foo") </code></pre>
5,164
<p>I have created a UserControl that has a <code>ListView</code> in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the <code>ListView</code> though the property, the <code>ListView</code> stays that way until I compile again and it reverts back to the d...
<p>You need to decorate the ListView property with the DesignerSerializationVisibility attribute, like so:</p> <pre><code>[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ListView MyListView { get { return this.listView1; } } </code></pre> <p>This tells the designer's code generator t...
<p>Just so I'm clear, you've done something like this, right?</p> <pre><code>public ListView MyListView { get { return this.listView1; } } </code></pre> <p>So then you are accessing (at design time) the MyListView property on your UserControl?</p> <p>I think if you want proper design-time support you're better off c...
3,653
<p>SketchUp Make is licensed for non-commercial work only. This includes the output from the software.</p> <blockquote> <p>Trimble Navigation Limited and/or its affiliates (&quot;Trimble&quot;) gives you a personal, worldwide, royalty-free, non-assignable and non-exclusive license to use the executable version of the ...
<p>Again, I'm not a specialist in intellectual property law (or any other sort of lawyer), but I have a different interpretation.</p> <p>There is a potential difference between the use of the product, and the use of the derivatives of the product. For example, GCC has a restrictive (open) license, but its OK (in some ...
<p>IANAL, naturally, so take this with that in mind.</p> <p>From what I've read and been instructed, any software which is licenced as non-commercial cannot be redistributed or incorporated into any commercial software product. The other thing about "noncommercial" software licenses is that they can't be used for cor...
511
<p>I have a ListView control, and I'm trying to figure out the easiest/best way to disallow changing the selected row(s), without <em>hiding</em> the selected row(s).</p> <p>I know there's a <code>HideSelection</code> property, but that only works when the <code>ListView</code> is still enabled (but not focused). I ne...
<p>You could also make the ListView ownerdraw. You then have complete control over how the items look whether they are selected or not or whether the ListView itself is enabled or not. The DrawListViewItemEventArgs provides a way to ask the ListView to draw individual parts of the item so you only have to draw the bits...
<p>Implement SelectedIndexChanged and do this</p> <pre><code> private void listViewABC_SelectedIndexChanged(object sender, EventArgs e) { listViewABC.SelectedItems.Clear(); } </code></pre>
3,489
<p>I'm writing a web app that points to external links. I'm looking to create a non-sequential, non-guessable id for each document that I can use in the URL. I did the obvious thing: treating the url as a string and str#crypt on it, but that seems to choke on any non-alphanumberic characters, like the slashes, dots and...
<p>Depending on how long a string you would like you can use a few alternatives:</p> <pre><code>require 'digest' Digest.hexencode('http://foo-bar.com/yay/?foo=bar&amp;a=22') # "687474703a2f2f666f6f2d6261722e636f6d2f7961792f3f666f6f3d62617226613d3232" require 'digest/md5' Digest::MD5.hexdigest('http://foo-bar.com/yay/...
<p>Use <a href="http://ruby-doc.org/stdlib/libdoc/digest/rdoc/index.html" rel="nofollow noreferrer">Digest::MD5</a> from Ruby's standard library:</p> <pre><code>Digest::MD5.hexdigest(my_url) </code></pre>
9,344
<p>There are times when certain standardised comments are called for.</p> <p>Here are some examples (the links go to the various sections below, under the Answers):</p> <ul> <li><a href="https://3dprinting.meta.stackexchange.com/questions/303/do-we-have-standardised-comments#answer-305">General comments</a></li> <li>Pr...
<h1>Comments</h1> <blockquote> <h2>Question in a comment</h2> <p>Hi and welcome to SE.3DP! Please do not ask new questions in comments. Without wishing to sound harsh, StackExchange is a Q&amp;A site, and not a forum of threaded messages. The reason for this is to aid the search for answers to issues, and provide it in...
<h1>Questions</h1> <p><em>Please note that if a user is new and has shown some research effort in composing the question, gently guide the new user in completing the question rather than using some of the statements below. If a question needs some more information or an image, use comments or flag for moderator attenti...
52
<p>We have an intranet site backed by SVN, such that the site is a checkout out copy of the repository (working folder used only by IIS). Something on the site has been causing problems today, and I want to know how to find out what was checked out to that working folder in the last 48 hours.</p> <p><strong>Update:</...
<p>All the code in the web folder should be backed by SVN commits, shouldn't it?</p> <p>If this is the case you should easily be able to track the problem down just by looking through your SVN logs at the last few changes that got committed. <code>svn info</code> will tell you which revision the working copy currently...
<p>I would run a <em>svn st</em> in the web folder (to find any files that are changed since the checkout) and compare that to the repository.</p>
7,882
<p>I have recently begun working on a project to establish how best to leverage the processing power available in modern graphics cards for general programming. It seems that the field general purpose GPU programming (GPGPU) has a large bias towards scientific applications with a lot of heavy math as this fits well wit...
<p>General programming translates terribly to GPUs. GPUs are dedicated to performing fairly simple tasks on streams of data at a massive rate, with massive parallelism. They do not deal well with the rich data and control structures of general programming, and there's no point trying to shoehorn that into them.</p>
<p>I do a lot of simplifying of configuration. That is I wrap the generation/management of configuration values inside a UI. The primary benefit is I can control work flow and presentation to make it simpler for non-techie users to configure apps/sites/services.</p>
6,656
<p>How do I determine the size of my array in C? </p> <p>That is, the number of elements the array can hold?</p>
<p><strong>Executive summary:</strong></p> <pre><code>int a[17]; size_t n = sizeof(a)/sizeof(a[0]); </code></pre> <hr> <p><strong>Full answer:</strong></p> <p>To determine the size of your array in bytes, you can use the <code>sizeof</code> operator:</p> <pre><code>int a[17]; size_t n = sizeof(a); </code></pre> <...
<p><strong>Note:</strong> This one can give you undefined behaviour as <a href="https://stackoverflow.com/questions/37538/how-do-i-determine-the-size-of-my-array-in-c/37539#comment91048046_51392277">pointed out by M.M</a> in the comment.</p> <pre><code>int a[10]; int size = (*(&amp;a+1)-a); </code></pre> <p>For more de...
5,828
<p>Given an empty method body, will the JIT optimize out the call (I know the C# compiler won't). How would I go about finding out? What tools should I be using and where should I be looking?</p> <p>Since I'm sure it'll be asked, the reason for the empty method is a preprocessor directive.</p> <hr> <p>@Chris: Makes ...
<p>This chap has quite a good treatment of JIT optimisations, do a search on the page for 'method is empty', it's about half way down the article -</p> <p><a href="http://www.codeproject.com/KB/dotnet/JITOptimizations.aspx" rel="noreferrer">http://www.codeproject.com/KB/dotnet/JITOptimizations.aspx</a></p> <p>Apparen...
<p>All things being equal, yes it should be optimized out. The JIT inlines functions where appropriate and there are few things more appropriate than empty functions :)</p> <p>If you really want to be sure then change your empty method to throw an exception and print out the stack trace it contains.</p>
3,289
<p>I have a 3D printer that is going crazy with x-axis shift, and I need a tension gauge belt to measure the tension.</p> <p>I've never used one before, and looking online, I can't tell which one would be the right fit.</p> <p>Any ideas? What things should I look for?</p>
<p>It's extremely unlikely that belt tension is actually your problem. I've never heard of anyone using a gauge to measure their belt tension. Typically you just pull your belt tight by hand so that it produces a low note when plucked. It's far more likely that you're experiencing shifts due to too high or too low step...
<p>People are using this <a href="https://i.stack.imgur.com/zA3d9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zA3d9.png" alt="Clothpin springs repurposed into a makeshift belt tensioner" /></a> to tighten the belt but I would totally agree with @Tom - there is no need to use such devices or gauge...
253
<p>Is it possible to get UI text from an external application in C#. </p> <p>In particular, is there a way to read Unicode text from a label (I assume it's a normal Windows label control) from an external Win32 app that was written by a 3rd party? The text is visible, but not selectable by mouse in the UI.</p> <p>I a...
<p>You could do it if that unicode text is actually a window with a caption by sending a <a href="http://msdn.microsoft.com/en-us/library/ms632627.aspx" rel="nofollow noreferrer">WM_GETTEXT</a> message. </p> <pre><code>[DllImport("user32.dll")] public static extern int SendMessage (IntPtr hWnd, int msg, int Param, Sys...
<p>didn't see the values for wm_gettext or wm_gettextlength in that article, so just in case..</p> <pre><code>const int WM_GETTEXT = 0x0D; const int WM_GETTEXTLENGTH = 0x0E; </code></pre>
3,919
<p>I recently printed out Jeff Atwood's <a href="http://www.codinghorror.com/blog/archives/001157.html" rel="nofollow noreferrer">Understanding The Hardware</a> blog post and plan on taking it to Fry's Electronics and saying to them "Give me all the parts on these sheets so I can put this together." However, I'm going ...
<p>Hardware's generally pretty OS-agnostic (at least in terms of Windows flavors) these days. Your only concern is getting drivers for other devices (scanners, printers, IR remotes) that won't work on 64bit and/or won't work on "Server" OSes. Online backup software like Mozy generally won't even install on a Server OS,...
<p>You have a $1000 operating system license and you're going to put it on ~$1100 worth of hardware purchased at Fry's and presumably put together by yourself?</p>
5,984
<p>I'm trying to use one of the RAMPS GPIOs to control an external device that requires a 5V low-current logic level signal from Marlin. In order to do this programmatically, my host software (Octoprint) is sending an M42 command. I am using the following syntax:</p> <pre><code>M42 P4 S255 </code></pre> <p>according ...
<p>I looked at the current Marlin code and the P24 command should work as you expect it unless the pin you are trying to use in listed as the "SENSITIVE_PINS" list:</p> <pre><code>#define SENSITIVE_PINS { 0, 1, \ X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \ Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PI...
<p>Might be because servo pins are not connected to 5V. use Jumper as shown</p> <p><a href="https://i.stack.imgur.com/ycegg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ycegg.png" alt="enter image description here"></a></p>
485
<p>I'm trying to mixin the <code>MultiMap</code> trait with a <code>HashMap</code> like so:</p> <pre><code>val children:MultiMap[Integer, TreeNode] = new HashMap[Integer, Set[TreeNode]] with MultiMap[Integer, TreeNode] </code></pre> <p>The definition for the <code>MultiMap</code> trait is:</p> <pre><code>trait ...
<p>I had to import <code>scala.collection.mutable.Set</code>. It seems the compiler thought the Set in <code>HashMap[Integer, Set[TreeNode]]</code> was <code>scala.collection.Set</code>. The Set in the MultiMap def is <code>scala.collection.</code><strong><code>mutable</code></strong><code>.Set</code>. </p>
<p>That can be annoying, the name overloading in Scala's collections is one of its big weaknesses.</p> <p>For what it's worth, if you had <code>scala.collection._</code> imported, you could probably have written your <code>HashMap</code> type as:</p> <pre><code>new HashMap[ Integer, mutable.Set[ TreeNode ] ] </code><...
7,314
<p>My current employer uses a 3rd party hosted CRM provider and we have a fairly sophisticated integration tier between the two systems. Amongst the capabilities of the CRM provider is for developers to author business logic in a Java like language and on events such as the user clicking a button or submitting a new...
<pre><code>Map map = new HashMap(); Hashtable ht = new Hashtable(); </code></pre> <p>Both classes can be found from the java.util package. The difference between the 2 is explained in the following <a href="http://www.jguru.com/faq/view.jsp?EID=430247" rel="noreferrer">jGuru FAQ entry</a>.</p>
<pre><code>Hashtable&lt;Object, Double&gt; hashTable = new Hashtable&lt;&gt;(); </code></pre> <p><strong>put values</strong> ...</p> <p><strong>get max</strong></p> <pre><code>Optional&lt;Double&gt; optionalMax = hashTable.values().stream().max(Comparator.naturalOrder()); if (optionalMax.isPresent()) System.out.pr...
4,898
<p>My model is a keycap for mechanical keyboards. There is the cap itself, and a stem with a hole in the form of a cross, which fits the switches themselves.</p> <p><a href="https://i.stack.imgur.com/r0Xxb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r0Xxb.jpg" alt="Print at bottom, the other cap...
<h2>This looks like a shift rather than a twist.</h2> <p>Looking closely at the "+" opening, it doesn't look as much twisted as it looks as if the top and bottom halves are sheared, with the top half shifted slightly right and the bottom shifted slightly left. The horizontal part of the plus seems aligned on the left...
<p>Another possibility is that those connectors you put in are pulling the cross-pattern off-center. Is there enough height that you could specify supports in that area instead? If so I'd recommend a brim "everywhere" to help stabilize the supports under the centerpost. </p> <p>If there is sufficient clearance in ...
1,597
<p></p> <p>It is supposed to be backwards compatible with HTML4 and XHTML. <a href="http://ejohn.org/blog/html5-doctype/" rel="nofollow noreferrer">John Resig posted about some of the benefits</a>.</p> <p>As long as we don't use any of the new and not supported yet features, would there be any downside to start build...
<p>Well consider this:</p> <p>When serving as text/html, all you need a doctype for is to trigger standards mode. Beyond that, the doctype does nothing as far as browsers are concerned.</p> <p>When serving as text/html, whether you use XHTML markup or HTML markup, it's treated by browsers as HTML.</p> <p>So, really ...
<p>Personally I'd say no. There is no clear benefit to HTML5 and in fact would go as far as to say that the whole thing is botched from the start.</p> <p>Having specialised tags for header, footers and sidebars is a huge mistake - you've got them already in the form of tags (div) and names (classes/id's). Why do we ne...
2,750
<p><strong>Is there a way to enforce/limit the types that are passed to primitives?</strong> <em>(bool, int, string, etc.)</em></p> <p>Now, I know you can limit the generic type parameter to a type or interface implementation via the <em>where</em> clause. However, this doesn't fit the bill for primitives (AFAIK) becau...
<pre><code>public class Class1&lt;GenericType&gt; where GenericType : struct { } </code></pre> <p>This one seemed to do the job..</p>
<p>In dotnet 6, I encountered this error when using <code>struct</code>:</p> <blockquote> <p>The type 'string' must be a non-nullable value type in order to use it as parameter 'T'</p> </blockquote> <p>So I use IConvertible instead</p> <pre><code>var intClass = new PrimitivesOnly&lt;int&gt;(); var doubleClass = new Pri...
3,039
<p>Is there someway to have a part of the page that renders like a little sub-page, like components?</p> <p>For example, if I have a shopping cart on all my pages?</p>
<p>If you want it to render another controllers action, as a component, to get encapsulation, you use.</p> <p>Html.RenderAction</p> <p>uses routedata to get you there, has its own viewdata and kind of mini life cycle</p>
<p>You are looking for <a href="http://groups.google.com/group/mvccontrib-discuss/browse_thread/thread/b050e21fe322c08a" rel="nofollow noreferrer">subcontrollers</a>. This implementation is the best way to do what you are talking about.</p> <p>Edit: I just posted about this here: <a href="http://mhinze.com/subcontrol...
9,961
<p>Does anyone have any experience with how well web services build with Microsoft's WCF will scale to a large number of users?</p> <p>The level I'm thinking of is in the region of 1000+ client users connecting to a collection of WCF services providing the business logic for our application, and these talking to a dat...
<p>To ensure your WCF application can scale to the desired level I think you might need to tweak your thinking about the stats your services have to meet.</p> <p>You mention servicing "1000+ client users" but to gauge if your services can perform at that level you'll also need to have some estimated usage figures, whi...
<p><a href="http://weblogs.asp.net/paolopia/archive/2008/03/23/wcf-configuration-default-limits-concurrency-and-scalability.aspx" rel="nofollow noreferrer">WCF configuration default limits, concurrency and scalability</a></p>
6,545
<p>Building a 3-D printer is obviously a huge undertaking.</p> <p>Does anyone know of any reasonably cheap guides to build my own 3-D printer?</p>
<p>Building a 3-D printer is actually very easy, assuming that you are electronically and mechanically competent, and there are a whole bunch of websites devoted to doing just that. The principal of which would be the <a href="http://reprap.org/wiki/Main_Page" rel="noreferrer">RepRapWiki</a>.</p> <p>There are a number...
<p>If you just want to build your own, get a kit. There are several out there. Most kits take from 1-5 days to complete depending on the kit.</p> <p>If you want to design your own is quite a different story. The effort is totally dependent on how much you want to do yourself. My guess is the statement that you don...
638
<p>While printing a <a href="https://www.thingiverse.com/thing:3932302" rel="nofollow noreferrer">paint rack from thingiverse</a> I keep getting jams. Other prints (shorter) work fine. Can anyone give me a clue?</p> <p>Here's a <a href="https://photos.app.goo.gl/PQuJwqNdYWSMTiwm6" rel="nofollow noreferrer">video of the...
<p>When I started printing ABS with my Prusa i3 MK3 MMU2+ printer, I started experiencing jams on some longer prints, which was heat creap, possibly combined with old filament.</p> <p>I improved the cooling by filling the gap between the sides of the heat sink and the plastic extruder body. I think I stuffed it with so...
<p>The maker geeks formulation of PLA requires much hotter temperatures. The plastic was not melted enough for good flow.</p>
1,804
<p>I am pretty sure that sanding makes a lot of microplastics, so it would be nice to collect the dust, and melt it to got a blob of plastic again instead of millions of tiny particles. What is the best way for collecting it, do you use any dust extractor, or are there different techniques like sanding wet surfaces and...
<p>I decided to collect the dust and treat both PLA and ABS with chemicals to completely break them down. That solves the issue and I won't rely on false hopes that somehow it does not end up in the environment.</p>
<p>As an environmental thing, micro plastics are an urgent problem for ocean life, it’s getting into the entire food chain. With that in mind dumping it down the drain would be the worst, city filtration systems can’t get the tiny bits of plastic before it drains into the ocean. Sanding outside is kind of bad. I sand s...
1,974
<p>I've been successful with writing my own SQL access code with a combination of stored procedures and parameterized queries and a little wrapper library I've written to minimize the ADO.NET grunge. This has all worked very well for me in the past and I've been pretty productive with it. </p> <p>I'm heading into a ne...
<p>I find that LINQ to SQL is much, much faster when I'm prototyping code. It just blows away any other method when I need something now.</p> <p>But there is a cost. Compared to hand-rolled stored procs, LINQ is slow. Especially if you aren't very careful as seemingly minor changes can suddenly make a single turn into...
<p>There was a great discussion on this topic at DevTeach in Montreal. If you go to this URL: <a href="http://www.dotnetrocks.com/default.aspx?showNum=240" rel="nofollow noreferrer">http://www.dotnetrocks.com/default.aspx?showNum=240</a> you will be able to hear two experts in the field (Ted Neward and Oren Eini) disc...
8,474
<p>My good friend, Wikipedia, <a href="http://en.wikipedia.org/wiki/Language_binding" rel="noreferrer">didn't give me a very good response</a> to that question. So:</p> <ul> <li>What are language bindings?</li> <li>How do they work?</li> </ul> <p>Specifically accessing functions from code written in language X of a l...
<p>Let's say you create a C library to post stuff to stackoverflow. Now you want to be able to use the same library from Python. In this case, you will write Python bindings for your library.</p> <p>Also see SWIG: <a href="http://www.swig.org" rel="noreferrer">http://www.swig.org</a></p>
<p>In Flex (Actionscript 3). <a href="http://livedocs.adobe.com/flex/1/flex_builder_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Using_Flex_Builder&amp;file=brady712.htm" rel="nofollow noreferrer">Source</a></p> <p>A data binding copies the value of a property in one object to a property in another object. You can...
4,545
<p>While it would be very convenient to use inline functions at some situations,</p> <p>Are there any drawbacks with inline functions?</p> <p><strong>Conclusion</strong>:</p> <p>Apparently, There is nothing wrong with using inline functions.</p> <p>But it is worth noting the following points!</p> <ul> <li><p>Overu...
<p>It worth pointing out that the inline keyword is actually just a hint to the compiler. The compiler may ignore the inline and simply generate code for the function someplace.</p> <p>The main drawback to inline functions is that it can <strong>increase the size of your executable</strong> (depending on the number of...
<ol> <li><p>As other people said that inline function can create a problem if the the code is large.As each instruction is stored in a specific memory location ,so overloading of inline function make a code to take more time to get exicuted.</p></li> <li><p>there are few other situations where inline may not work</p> ...
8,588
<p>I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test).</p> <p>Yes, I can test the underlying objects...
<p>I found <a href="http://haacked.com/archive/2006/12/12/using_webserver.webdev_for_unit_tests.aspx" rel="nofollow noreferrer">this post</a> and <a href="http://www.hanselman.com/blog/NUnitUnitTestingOfASPNETPagesBaseClassesControlsAndOtherWidgetryUsingCassiniASPNETWebMatrixVisualStudioWebDeveloper.aspx" rel="nofollow...
<p>Not sure what you're asking. If you're looking to do this without some sort of webserver in between your test and the service, you're going to be disappointed.</p> <p>If that's not what you're asking... maybe some clarification?</p>
4,124
<p>So I have a function that looks something like this:</p> <pre><code>float function(){ float x = SomeValue; return x / SomeOtherValue; } </code></pre> <p>At some point, this function overflows and returns a really large negative value. To try and track down exactly where this was happening, I added a cout ...
<p>Welcome to the wonderful world of floating point. The answer you get will likely depend on the floating point model you compiled the code with. </p> <p>This happens because of the difference between the IEEE spec and the hardware the code is running on. Your CPU likely has 80 bit floating point registers that ge...
<p>I dont think the cout has any effect on the variable, the problem would have to be somewhere else.</p>
7,151