instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I'm looking at a new computer which will probably have vista on it. But there are so many editions of vista; are there any weird restrictions on what you can run on the various editions? For instance you couldn't run IIS on Windows ME. Can you still run IIS on the home editions of vista? </p>
<p>There's a very nice and efficient algorithm for this using a method called <strong>reservoir sampling</strong>.</p> <p>Let me start by giving you its <strong>history</strong>:</p> <p><strong>Knuth</strong> calls this Algorithm R on p. 144 of his 1997 edition of Seminumerical Algorithms (volume 2 of The Art of Comp...
<p>Well, you do need to know what N is at runtime at least, even if this involves doing an extra pass over the list to count them. The simplest algorithm to do this is to just pick a random number in N and remove that item, repeated k times. Or, if it is permissible to return repeat numbers, don't remove the item.</p> ...
7,768
<p>How can I programatically cause a control's tooltip to show in a Winforms app without needing the mouse to hover over the control? (P/Invoke is ok if necessary). </p>
<p>If you are using the <code>Tooltip</code> control on the form, you can do it like this:</p> <p><code>ToolTip1.Show("Text to display", Control)</code></p> <p>The <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.show.aspx" rel="noreferrer">MSDN documentation for the ToolTip control's "Sh...
<p>This is the code I use:</p> <pre><code>static HWND hwndToolTip = NULL; void CreateToolTip( HWND hWndControl, TCHAR *tipText ) { BOOL success; if( hwndToolTip == NULL ) { hwndToolTip = CreateWindow( TOOLTIPS_CLASS, NULL, WS_POPUP | ...
8,891
<p>Linq To SQL or Entity framework both integrate nicely with SQL Server 2005.</p> <p>The SQL Server 2008 spec sheet promises even better integration - but I can't see it.</p> <p>What are some examples of what you can do Linq-wise when talking to a 2008 server that you can't when talking to SQL Server 2005?</p>
<p>There is a problem of paging over a joined set that SQL 2005 mis-interprets.</p> <pre><code>var orders = ( from c in Customers from o in c.Orders select new {c, o} ).Skip(10).Take(10).ToList(); </code></pre> <p>LINQ generates a ROW_Number against the joined set. SQL2005 generates a bad plan from that code. Here'...
<p>it has full support for the new data types. lol. beyond that you got me, other than possibilities of optimised queries (like the merge command, etc).</p>
3,621
<p>I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC's and there is a fair amount of code but it shouldn't take minutes to build and crash daily should it?</p>
<p>In addition to the suggestions already mentioned, close any projects that you have open that you are not using.</p> <p>Rich click on the Project in the Navigator view and select "Close Unrelated Projects".</p> <p>Depending on how many projects you have open, this can lead to a significant improvements in compile t...
<p>Usually the first build takes the longest, and then it's pretty quick after that. That's using Vista x64 w/ core 2 duo. </p> <p>Otherwise, I am nearly certain a Intel Core i7 Extreme Edition 965 3.2GHz upgrade processor would speed your Flex building up nicely .. :) :) :)</p>
5,386
<p>I just got my first 3D printer (Creality Ender 3) on Friday, 2 days ago. It works great, but for some reason I'm getting a lot of stringing on my prints, especially the ones where the extruder head has to move a long distance between columns/posts, etc.</p> <p>I'm using Hatchbox "True White" PLA, which has a recomm...
<p>4.5 mm is a low retraction distance. Cura's default is 6.5 mm, and the Ender 3 profile provided with Cura sets it to 6 mm. The first thing you should try is increasing the retraction amount up to at least 6 mm. Also, make sure you actually enabled retraction. I saw one question here where a Cura user had enabled "Re...
<p>decrease retraction speed to 25-30mm/sec</p>
1,434
<p>Is there a way to track which window currently has keyboard focus. I could handle WM_SETFOCUS for every window but I'm wondering if there's an alternative, simpler method (i.e. a single message handler somewhere).</p> <p>I could use OnIdle() in MFC and call GetFocus() but that seems a little hacky.</p>
<p>So from the way you worded the question I'm inferring that you want to have an event handler which is invoked whenever focus switches between windows. You want to be notified, rather than having to poll.</p> <p>I actually don't think calling GetFocus from OnIdle is that much of a hack - sure it's polling, but it's ...
<p>You could monitor messages for the <a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_activate.asp?frame=true" rel="nofollow noreferrer">WM_ACTIVATE</a> event.</p> <p><a href="http://blogs.msdn.com/jfoscoding/arch...
6,595
<p>I recently bought a Titan Aero hot end which came with a 24 V 30 W heater cartridge from E3D. I'd like to use this but the cable length is only 1 meter long and I need it to be 2 meters. The ends terminate with prong connections and there is no polarity to the prongs. How can I safely extend the leads one meter a...
<h1>Heater polarity doesn't matter</h1> <p>The heater cartridges are just large resistors and so polarity is irrelevant. Either can be positive or negative.</p> <p>You can extend the leads by cutting and splicing in ~20 gauge wires* to a two pin JST connector line you suggest.</p> <hr /> <p>*<sup>At 24 volts and 30 wat...
<p>1 meter puts you far enough away from the heater than you don't need high temperature wiring to extend it. The larger the guage(e.g. 20 guage) the less resistance you will add to the heater circuit. This doesn't matter as long as you can still achieve your maximum temperature (if you can still achieve the same cur...
1,918
<p>What are the JVM implementations available on Windows Mobile?</p> <p><a href="http://www.esmertec.com/40.html" rel="noreferrer">Esmertec JBed</a> is the one on my WinMo phone.</p> <p>Wondering how many other JVM vendors are in this zone. Are there any comparison or benchmarking data available?</p>
<p>JVM Choices for Windows CE in general (including Pocket PC and Windows Mobile):</p> <ul> <li>CrE-ME</li> <li><a href="http://www2s.biglobe.ne.jp/~dat/java/project/jvm/index_en.html" rel="noreferrer">Mysaifu</a></li> <li><a href="http://www.skelmir.com/solutions/handheld.html" rel="noreferrer">Skelmir CEEJ</a></li> ...
<p>This is not really an answer, but wouldn't it make more sense to target your software at the .NET framework compact edition if you're developing for WinMo?</p>
7,904
<p>Since I have lots of PETG, I ran tuning to 230 °C (average temp for my filaments). What is it good for, in terms of temperature ranges?</p> <p>For the same printer configuration, and just different filaments, will I need to run it again and again? Let's assume that I'll be printing between 200 °C and 240 °C.</p> <p>...
<p>PID tuning can be performed multiple times and the results saved for future use, since the question is about &quot;what are the usable ranges for PID tuning&quot;, based on my experience</p> <ol> <li>a slightly suboptimal tuning will not make the temperature oscillate more than 2-3 degrees, which is more than enough...
<p>It's not a straight answer, but you don't have to run PID tuning every time you decide to print with different temperature. (Until you change something in a hardware near or related to the hotend.)</p> <p>You can tune PID for different temperatures and grab necessary values, for example:</p> <pre><code>M303 C16 D1 E...
1,857
<p>In Ruby 1.8, there are subtle differences between proc/lambda on the one hand, and <code>Proc.new</code> on the other. </p> <ul> <li>What are those differences?</li> <li>Can you give guidelines on how to decide which one to choose?</li> <li>In Ruby 1.9, proc and lambda are different. What's the deal?</li> </ul>
<p>Another important but subtle difference between procs created with <code>lambda</code> and procs created with <code>Proc.new</code> is how they handle the <code>return</code> statement:</p> <ul> <li>In a <code>lambda</code>-created proc, the <code>return</code> statement returns only from the proc itself</li> <li>I...
<p>The difference in behaviour with <code>return</code> is IMHO the most important difference between the 2. I also prefer lambda because it's less typing than Proc.new :-)</p>
2,305
<p>I have a control that, upon postback, saves form results back to the database. It populates the values to be saved by iterating through the querystring. So, for the following SQL statement (vastly simplified for the sake of discussion)...</p> <pre><code>UPDATE MyTable SET MyVal1 = @val1, MyVal2 = @val2 WHERE @i...
<p>First of all, I would suggest against adding all entries on the querystring as parameter names, I'm not sure this is unsafe, but I wouldn't take that chance.</p> <p>The problem is you're calling</p> <pre><code>Command.Parameters.AddWithValue("@val2", null) </code></pre> <p>Instead of this you should be calling:</...
<p>Update: The solution I gave is based on the assumption that it is a stored proc. <em>Will giving a default value of Null to the SQL Stored proc parameters work?</em></p> <p>If it is dynamic sql, always pass the correct number of params, whether it is null or the actual value or specify default values.</p>
9,130
<p>So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to s...
<p>First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are dif...
<p>Visual Studio comes with a <a href="http://msdn.microsoft.com/en-us/library/bt727f1t(VS.71).aspx" rel="nofollow noreferrer">remote debugger</a> that you can run as an exe on your server. It works best if you can run it as the same domain user as your copy of visual studio. You can then do an attach to process from t...
6,087
<p>I am developing an online strategy game using .Net v2. Although the game is primarily strategic, it does have some tactical elements that require reasonable network performance. I plan to use TCP packets for strategic data and UDP packets for tactical data. </p> <p>{EDIT} I forgot to mention that I am leaning away ...
<p>Microsoft's own .NET based <a href="http://creators.xna.com/" rel="noreferrer">XNA</a> allows you to create networked games on Windows and XBox 360.</p>
<p>If you're new to game development, I'd recommend XNA- it's easy to program with. The advantage of Torque, however, is it has asset creation tools, which can also be invaluable. For a higher end game or FPS, the Source engine is great.</p>
6,901
<p>Has anybody used C# to write a sample screen scraper for IBM as400?</p>
<p><a href="http://www.codeproject.com/KB/cs/all_ehllapi.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/all_ehllapi.aspx</a></p> <p>I've modified this example and it works just fine.</p>
<p>I wrote one in C many years ago for a project at Frigidaire. The internal card would cause all sorts of fun with memory leaks but I eventually found a solution by allocating arrays at the boundary of the communication card. This was over 8 years ago, I'm sure today's cards are much better and/or using native comm ...
9,050
<p>I found <a href="https://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference">What are mvp and mvc and what is the difference</a> but it didn't really answer this question.</p> <p>I've recently started using MVC because it's part of the framework that myself and my work-partner are goin...
<p>MVC is the separation of <b>m</b>odel, <b>v</b>iew and <b>c</b>ontroller — nothing more, nothing less. It's simply a paradigm; an ideal that you should have in the back of your mind when designing classes. Avoid mixing code from the three categories into one class.</p> <p>For example, while a table grid <em>view</e...
<p>Main advantage of MVC architecture is differentiating the layers of a project in Model,View and Controller for the Re-usability of code, easy to maintain code and maintenance. The best thing is the developer feels good to add some code in between the project maintenance. </p> <p>Here you can see the some more point...
4,622
<p>Is there an easy way to discover a File's creation time with Java? The File class only has a method to get the "last modified" time. According to some resources I found on Google, the File class doesn't provide a getCreationTime() method because not all file systems support the idea of a creation time.</p> <p>The...
<p>With the release of Java 7 there is a built-in way to do this:</p> <pre><code>Path path = Paths.get("path/to/file"); BasicFileAttributes attributes = Files.readAttributes(path, BasicFileAttributes.class); FileTime creationTime = attributes.creationTime(); </code></pre> <p>It is important to note that not all opera...
<p>This is a basic example in <code>Java</code>, using <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/BasicFileAttributes.html" rel="nofollow"><strong><code>BasicFileAttributes</code></strong></a> class:</p> <pre><code> Path path = Paths.get("C:\\Users\\jorgesys\\workspaceJava\\myfile.txt...
5,253
<p>I was listening to a <a href="http://www.hanselminutes.com/default.aspx?showID=143" rel="noreferrer">recent episode of Hanselminutes</a> where Scott Hanselman was discussing accessibility in web applications and it got me thinking about accessibility in my own applications.</p> <p>We all understand the importance o...
<p>Check out <a href="http://www.standards-schmandards.com/index.php?show/fangs" rel="nofollow noreferrer">Fangs</a></p> <p><a href="http://www.standards-schmandards.com/index.php?show/fangs" rel="nofollow noreferrer">Fangs</a> is an in-browser tool for Firefox that emulates what a screen reader “sees” when visiting a...
<p>Biggest problem with screen readers is usually tables to position things on your page. Screenreaders can't really handle those. Put stuff in div's in your html and put them in a sensible order. Then position the div's on your page with css. Use tables to display content that should be in a table.</p>
8,659
<p>We got <a href="https://3dprinting.meta.stackexchange.com/questions/314/can-we-get-mathjax-enabled">MathJax enabled</a>. Today I learned that there is even more! We could have <a href="https://worldbuilding.meta.stackexchange.com/questions/9710/can-we-extend-mhchem-support-in-mathjax-to-include-physical-units?cb=1">...
<p>The deed is done. Behold! In all its glory:</p> <p><span class="math-container">$$\pu{273.15 K}$$</span></p>
<p>I do not support this request to support physical units.</p> <p><em>(vote up this answer if you are not in favor)</em></p>
81
<p>After seeing a question about FDM printing of temperature-resistant parts, high-temperature 2-part epoxy came to mind. Are there any (experimental or production) FDM extruders for laying viscous, fast-curing epoxy, mixing it at the last moment before extrusion? Or likewise other cured/resin materials, either 2-part ...
<p>Apparently now the answer is yes. A company called MASSIVit has a system they call GDP - gel dispensing printing - that's essentially what I asked about, on an extremely large scale. 3D Printing Nerd has <a href="https://www.youtube.com/watch?v=SSE2q_ejjKc" rel="nofollow noreferrer">a video</a> from their booth at F...
<p>Is this what you're looking for?</p> <p>(<a href="https://the3dprinterbee.com/how-does-a-resin-3d-printer-work-sla-dlp-lcd-explained/" rel="nofollow noreferrer">https://the3dprinterbee.com/how-does-a-resin-3d-printer-work-sla-dlp-lcd-explained/</a>)</p> <p>Material Beam</p> <p>Material blasting is a unique 3D resin ...
1,847
<p>In Ruby on Rails Development (or MVC in general), what quick rule should I follow as to where to put logic.</p> <p>Please answer in the affirmative - With <em>Do put this here</em>, rather than <em>Don't put that there</em>.</p>
<p>MVC</p> <p><strong>Controller</strong>: Put code here that has to do with working out what a user wants, and deciding what to give them, working out whether they are logged in, whether they should see certain data, etc. In the end, the controller looks at requests and works out what data (Models) to show and what V...
<p>Testing, Testing ... Put as much logic as possible in the model and then you will be able to test it properly. Unit tests test the data and the way it is formed by testing the model, and functional tests test the way it is routed or controlled by testing the controllers, so it follows that you can't test the integri...
8,562
<p>I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git.</p> <p>Has anyone made a side-by-side comparison bet...
<p>These articles may help:</p> <ul> <li><a href="http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/" rel="noreferrer">Git vs. Mercurial: Please Relax</a> (Git is MacGyver and Mercurial is James Bond)</li> <li><a href="http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-g...
<p>This link may help you to understand the difference <a href="http://www.techtatva.com/2010/09/git-mercurial-and-bazaar-a-comparison/" rel="nofollow">http://www.techtatva.com/2010/09/git-mercurial-and-bazaar-a-comparison/</a></p>
5,641
<p>The primary class in the <code>subprocess</code> module is name <code>Popen</code>, and represents a subprocess. <code>Popen</code> sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does anyone know why it ...
<p>Now, I'm not saying that this is the greatest name in the world, but here was the idea as I understand it.</p> <p>Originally, the popen family was in the os module and was an implementation of the venerable posix popen. The movement to the subprocess module would have been an opportune time to rename them, but I g...
<p>I suppose the name was chosen because the functionality <code>subprocess</code> is replacing was formerly in the <code>os</code> module as the <code>os.popen</code> function. There could be even ways to automate migration between the two.</p>
5,911
<p>What is the difference between</p> <pre><code>char str1[32] = "\0"; </code></pre> <p>and </p> <pre><code>char str2[32] = ""; </code></pre>
<p>Since you already declared the sizes, the two declarations are exactly equal. However, if you do not specify the sizes, you can see that the first declaration makes a larger string:</p> <pre><code>char a[] = "a\0"; char b[] = "a"; printf("%i %i\n", sizeof(a), sizeof(b)); </code></pre> <p>prints</p> <pre><code>3 ...
<p>Unless I'm mistaken, the first will initialize 2 chars to 0 (the '\0' and the terminator that's always there, and leave the rest untouched, and the last will initialize only 1 char (the terminator).</p>
7,221
<p>I am using forms authentication. My users are redirected to a page (written in web.config) when they login, but some of them may not have the privilages to access this default page. In this case, I want them to redirect to another page but RedirectFromLoginPage method always redirects to the default page in web.conf...
<p>The <code>SetAuthCookie</code> allows you to issue the auth cookie but retain control over the navigation. After that method is called you can run your logic to do a typical ASP.NET redirect to wherever you want.</p>
<pre><code>if(mc.GetfaalUsers(mm.UserName.ToString())=="True") { this.Page.ClientScript. RegisterClientScriptBlock(this.GetType(), "key", "alert('این نام کاربری فعال نشده است');", false); FormsAuthentication.SignOut(); Response.Redirect("default.aspx"); } </code></pr...
5,746
<p>Say I have this given XML file:</p> <pre><code>&lt;root&gt; &lt;node&gt;x&lt;/node&gt; &lt;node&gt;y&lt;/node&gt; &lt;node&gt;a&lt;/node&gt; &lt;/root&gt; </code></pre> <p>And I want the following to be displayed:</p> <pre><code>ayx </code></pre> <p>Using something similar to:</p> <pre><code>&lt;xsl...
<p>Easy!</p> <pre><code>&lt;xsl:template match="/"&gt; &lt;xsl:apply-templates select="root/node"&gt; &lt;xsl:sort select="position()" data-type="number" order="descending"/&gt; &lt;/xsl:apply-templates&gt; &lt;/xsl:template&gt; &lt;xsl:template match="node"&gt; &lt;xsl:value-of select="."/&gt; &l...
<pre><code>&lt;xsl:template match="/"&gt; &lt;xsl:apply-templates select="root/node[3]"/&gt; &lt;xsl:apply-templates select="root/node[2]"/&gt; &lt;xsl:apply-templates select="root/node[1]"/&gt; &lt;/xsl:template&gt; &lt;xsl:template match="node"&gt; &lt;xsl:value-of select="."/&...
7,246
<p>What I have is a collection of classes that all implement the same interface but can be pretty wildly different under the hood. I want to have a config file control which of the classes go into the collection upon starting the program, taking something that looks like :</p> <pre><code>&lt;class1 prop1="foo" prop2="...
<p>It may be easier to serialise the classes to/from xml, you can then simply pass the XmlReader (which is reading your config file) to the deserializer and it will do the rest for you..</p> <p><a href="http://www.diranieh.com/NETSerialization/XMLSerialization.htm" rel="noreferrer">This is a pretty good article on seri...
<p>Reflection is what you want. Reflection + TypeConverter. Don't have much more time to explain, but just google those, and you should be well on your way. Or you could just use the xml serializer, but then you have to adhere to a format, but works great.</p>
5,114
<p>Printf got added to Java with the 1.5 release but I can't seem to find how to send the output to a string rather than a file (which is what sprintf does in C). Does anyone know how to do this? </p>
<pre><code>// Store the formatted string in 'result' String result = String.format("%4d", i * j); // Write the result to standard output System.out.println( result ); </code></pre> <p>See <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)" rel="nore...
<p>You can do a printf with a PrintStream to anything that is an OutputStream. Somehow like this, printing into a string stream:</p> <pre><code>PrintStream ps = new PrintStream(baos); ps.printf(&quot;there is a %s from %d %s&quot;, &quot;hello&quot;, 3, &quot;friends&quot;); System.out.println(baos.toString()); </code>...
6,923
<p>I'm trying to implement a data compression idea I've had, and since I'm imagining running it against a large corpus of test data, I had thought to code it in C (I mostly have experience in scripting languages like Ruby and Tcl.) </p> <p>Looking through the O'Reilly 'cow' books on C, I realize that I can't simply in...
<p>Following on from what Kyle has said, you can use a macro to do the hard work for you.</p> <blockquote> <p>It is possible.</p> <p>To set the nth bit, use OR:</p> <p>x |= (1 &lt;&lt; 5); // sets the 6th-from right</p> <p>To clear a bit, use AND:</p> <p>x &amp;= ~(1 &lt;&lt; 5); // clears 6t...
<p>IF you want to index a bit you could:</p> <pre><code>bit = (char &amp; 0xF0) &gt;&gt; 7; </code></pre> <p>gets the msb of a char. You could even leave out the right shift and do a test on 0.</p> <pre><code>bit = char &amp; 0xF0; </code></pre> <p>if the bit is set the result will be > 0;</p> <p>obviousuly, you n...
8,819
<p>I'm a long time hobbyist programmer interested in getting into web application development. I have a fair amount of personal experience with various non-web languages, but have never really branched over to web applications.</p> <p>I don't usually have any issues learning new languages or technologies, so I'm not w...
<p>There is a wide variety of web application languages you could get into. The ones I have most experience with (and therefore will be talking about here) are PHP, eRuby and Ruby on Rails. All of these have good tutorials available on the internet - I'll link to some of them below.</p> <p>Which to choose depends on e...
<p><a href="http://eloquentjavascript.net/" rel="nofollow noreferrer">Eloquent JavaScript</a> and <a href="http://appjet.com/learn-to-program/lessons/intro" rel="nofollow noreferrer">AppJet</a> offer great tutorials that allow you to follow along while you learn.</p> <p>Once you cover all the basics, <a href="http://a...
3,888
<p>I recently bought a 3D printer called Dreamer NX from FlashForge. The dealer told me to use FlashPrint software that belongs to the FlashForge printer manufacturer. But, many people advise me to use Ultimaker Cura. Are there many differences between these two software packages?</p>
<p>The commonality of the 2 slicers is that both are developed and maintained by a printer manufacturer. The largest difference is that FlashPrint is <a href="https://en.wikipedia.org/wiki/Proprietary_software" rel="nofollow noreferrer">closed/proprietary software</a>, while Ultimaker Cura is released in source (<a hre...
<p>Perhaps this is veering out a little bit from being an answer to the specific differences between software functionality, but one important difference that shouldn't be overlooked is that whatever you learn with Cura is applicable to <em>all FDM 3D printers</em>.</p> <p>Surely some setting tweaks you do might be sp...
1,450
<p>Googling 'HDPLA' has so far availed me very little. </p> <p><a href="http://3dinsider.com/what-is-pla/" rel="nofollow noreferrer">http://3dinsider.com/what-is-pla/</a> indicates that /all/ modern PLA is 'high density' compared to 'the early days'. But a fellow at the local makerspace indicated that he was specifica...
<p>So, low-teck, old-style investigative work from my side.... I contacted <a href="http://www.filright.com" rel="nofollow noreferrer">a company</a> selling HDPLA and they got back to me with the following reply.</p> <blockquote> <p>We created HDPLA as an industrial PLA with special additives. As a result, our so ca...
<p>I doubt that it means very much at all. Filament manufacturers are very tight-lipped about the co-polymers that they add to their base stock in order to improve handling and performance characteristics, so it is impossible to say. The only common attribute that I can see is an advertised diameter tolerance of &plusm...
790
<p>I have to load a PDF within a page.</p> <p>Ideally I would like to have a loading animated gif which is replaced once the PDF has loaded.</p>
<p>Have you tried:</p> <pre><code>$("#iFrameId").on("load", function () { // do something once the iframe is loaded }); </code></pre>
<p>Here is what I do for any action and it works in Firefox, IE, Opera, and Safari.</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ doMethod(); }); function actionIframe(iframe) { ... do what ever ... } function doMethod() { var iFrames = document.getElem...
4,985
<p><strong>Problem</strong></p> <p>I need to redirect some short convenience URLs to longer actual URLs. The site in question uses a set of subdomains to identify a set of development or live versions.</p> <p>I would like the URL to which certain requests are redirected to include the HTTP_HOST such that I don't have...
<p>It's strange that nobody has done the actual <strong>working</strong> answer (lol):</p> <pre><code>RewriteCond %{HTTP_HOST} support\.(([^\.]+))\.example\.com RewriteRule ^/terms http://support.%1/article/terms [NC,QSA,R] </code></pre> <hr> <p>To help you doing the job faster, my favorite tool to check for regexp:...
<p>According to this cheatsheet ( <a href="http://www.addedbytes.com/download/mod_rewrite-cheat-sheet-v2/png/" rel="nofollow noreferrer">http://www.addedbytes.com/download/mod_rewrite-cheat-sheet-v2/png/</a> ) this should work</p> <pre><code>RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://ww...
9,806
<p>What is the best unobtrusive CAPTCHA for web forms? One that does not involve a UI, rather a non-UI Turing test. I have seen a simple example of a non UI CAPTCHA like the <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/NoBot/NoBot.aspx" rel="noreferrer">Nobot</a> control from Microsoft. I am looking for...
<p>I think you might be alluding to an "invisible" captcha. Check out the Subkismet project for an invisible captcha implementation.</p> <p><a href="http://www.codeplex.com/subkismet" rel="noreferrer">http://www.codeplex.com/subkismet</a></p>
<p><a href="http://meyerweb.com" rel="nofollow noreferrer">Eric Meyer</a> implemented a very similar thing as a WordPress plugin called <a href="http://meyerweb.com/eric/tools/wordpress/wp-gatekeeper.html" rel="nofollow noreferrer">WP-GateKeeper</a> that asks human-readable questions like "What colour is an orange?". ...
2,516
<p>There has been some talk of Website performance monitoring tools and services on stackoverflow, however, they seem fairly expensive for what they actually do. Are there any good opensource libraries for automating checking/monitoring the availability of a website?</p>
<p>If you just want to know if your server is serving out content or not, take a look at <a href="http://www.montastic.com/" rel="nofollow noreferrer">Montastic</a>. I use it, and am pleased. Plus its free!</p> <p>It will ping your site periodically, and if it doesn't get a 200 status, it lets you know.</p>
<p>I have always used <a href="http://www.zabbix.com/" rel="nofollow noreferrer">Zabbix</a> especially for critical web sites. It uses MySql for the database and it has a PHP frontend. Of course it is open source and it is very flexible. It uses servers to stick data in the database and agents collect the data and s...
7,839
<p>I want to add the selected item from the <code>TreeView</code> to the <code>ListBox</code> control using <code>DataBinding</code> (If it can work with <code>DataBinding</code>). </p> <pre><code>&lt;TreeView HorizontalAlignment="Left" Margin="30,32,0,83" Name="treeView1" Width="133" ...
<p>You can bind to an element using ElementName, so if you wanted to bind the selected tree item to the ItemsSource of a ListBox:</p> <pre><code>ItemsSource="{Binding SelectedItem, ElementName=treeView1}" </code></pre>
<p>I'm pretty sure it is possible, since WPF is really flexible with data binding, but I haven't done that specific scenario yet.</p> <p>I've been following a <a href="http://blogs.msdn.com/wpfsdk/archive/2006/10/19/wpf-basic-data-binding-faq.aspx" rel="nofollow noreferrer">WPF Databinding FAQ</a> from the MSDN blogs ...
7,806
<p>I downloaded a couple of webapps and placed them in my /webapps folder. Some of them I could open by going to <code>http://localhost:8080/app1</code> and it would open. However, some others I would do the exact same thing and go to <code>http://localhost:8080/app2</code> and it will display "HTTP Status 404 - /app2/...
<p>I usually debug this by going the the manager page and making sure that all of the contexts are deployed (<a href="http://localhost:8080/manager/html" rel="noreferrer">http://localhost:8080/manager/html</a>). </p> <p>It sounds like app2 has not been deployed properly or is not starting up because of some other erro...
<p>If "/" is not accessible it means that there is no "index.html", "index.jsp" or whatever is defined in the welcome-files list of the web.xml Also no Servlet-Mapping for the context ROOT directory is present. Check the web.xml for Servlet-Mappings or try to figure out the name of the jsp/html /... file being in the c...
7,681
<p>I'm writing a structural modeling tool for a civil enginering application. I have one huge model class representing the entire building, which include collections of nodes, line elements, loads, etc. which are also custom classes. </p> <p>I have already coded an undo engine which saves a deep-copy after each modifi...
<p>Most examples I've seen use a variant of the <a href="http://en.wikipedia.org/wiki/Command_pattern" rel="noreferrer">Command-Pattern</a> for this. Every user-action that's undoable gets its own command instance with all the information to execute the action and roll it back. You can then maintain a list of all the c...
<p>I don't know if this is going to be of any use to you, but when I had to do something similar on one of my projects, I ended up downloading UndoEngine from <a href="http://www.undomadeeasy.com" rel="nofollow">http://www.undomadeeasy.com</a> - a wonderful engine and I really didn't care too much about what was under ...
7,237
<p>I'm trying to set up an inheritance hierarchy similar to the following:</p> <pre><code>abstract class Vehicle { public string Name; public List&lt;Axle&gt; Axles; } class Motorcycle : Vehicle { } class Car : Vehicle { } abstract class Axle { public int Length; public void Turn(int numTurns) { ... } } cl...
<p>Use more generics</p> <pre><code>abstract class Vehicle&lt;T&gt; where T : Axle { public string Name; public List&lt;T&gt; Axles; } class Motorcycle : Vehicle&lt;MotorcycleAxle&gt; { } class Car : Vehicle&lt;CarAxle&gt; { } abstract class Axle { public int Length; public void Turn(int numTurns) { ... } }...
<p>2 options spring to mind. 1 is using generics:</p> <pre><code>abstract class Vehicle&lt;TAxle&gt; where TAxle : Axle { public List&lt;TAxle&gt; Axles; } </code></pre> <p>The second uses shadowing - and this assumes you have properties:</p> <pre><code>abstract class Vehicle { public IList&lt;Axle&gt; Axles {...
5,097
<p>In C++ Windows app, I launch several long running child processes (currently I use CreateProcess(...) to do this. </p> <p>I want the child processes to be automatically closed <strong>if my main processes crashes</strong> or is closed.</p> <p>Because of the requirement that this needs to work for a crash of the "p...
<p>The Windows API supports objects called "Job Objects". The following code will create a "job" that is configured to shut down all processes when the main application ends (when its handles are cleaned up). This code should only be run once.:</p> <pre class="lang-cpp prettyprint-override"><code>HANDLE ghJob = Create...
<p>You'd probably have to keep a list of the processes you start, and kill them off one by one when you exit your program. I'm not sure of the specifics of doing this in C++ but it shouldn't be hard. The difficult part would probably be ensuring that child processes are shutdown in the case of an application crash. ...
7,664
<ul> <li>Any personal experience in overcoming web application performance hurdles? </li> <li>Any recommended strategies for improving the performance of a data-driven web application? </li> </ul> <p>My development team works on a web application (JSP reports, HTML, JavaScript) that uses an Oracle database (PL/SQL). T...
<p>While my answer may not contain any concrete steps to help this is always where I start.</p> <p>First thing I would do is try to throw away all of your assumptions about what the trouble is and take steps to install metrics everywhere you can. Let the metrics guide you rather than your intuition. I've chased many...
<p>As Webjedi says, metrics are your friend.</p> <p>Also look at your stack and see where there are opportunities for caching - then employ mercilessly wherever possible!</p>
4,274
<p>So WPF doesn't support standard sorting or filtering behavior for views of CompositeCollections, so what would be a best practice for solving this problem. </p> <p>There are two or more object collections of different types. You want to combine them into a single sortable and filterable collection (withing having t...
<p>Change the code for the About box to </p> <pre><code>Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Deployment.CurrentVersion.ToString) </code></pre> <p>Please note that all the other answers are correct for "how do I get my assembly version", not the stated question "how do I show my publish v...
<p>I'm no VB.NET expert, but have you tried to set the value to for example 1.0.0.*? This should increase the revision number (at least it does in the AssemblyInfo.cs in C#).</p>
3,243
<p>I need to create a 2D int array of size 800x800. But doing so creates a stack overflow (ha ha).</p> <p>I'm new to C++, so should I do something like a vector of vectors? And just encapsulate the 2d array into a class?</p> <p>Specifically, this array is my zbuffer in a graphics program. I need to store a z value...
<p>You need about 2.5 megs, so just using the heap should be fine. You don't need a vector unless you need to resize it. See <a href="https://isocpp.org/wiki/faq/freestore-mgmt#multidim-arrays" rel="nofollow noreferrer">C++ FAQ Lite</a> for an example of using a "2D" heap array.</p> <pre><code>int *array = new int[8...
<p>Well, building on what Niall Ryan started, if performance is an issue, you can take this one step further by optimizing the math and encapsulating this into a class.</p> <p>So we'll start with a bit of math. Recall that 800 can be written in powers of 2 as:</p> <pre><code>800 = 512 + 256 + 32 = 2^5 + 2^8 + 2^9 </c...
8,692
<p>Sometimes my meshes turn out with artifacts Which can be seen in the bottom image. What is the cause? The first image shows my mesh which its generated from. I've tried multiple slicers. This tends to occur sometimes. Any help appreciated. Is there something going over my head???</p> <p><a href="https://i.stack.img...
<p>Hardboard is called <em>Masonite</em> here in the States because that is the trade name of the product. If you look up the <a href="http://www.gunnersens.co.nz/images/stories/products/Masonite%20Standard/specs/Australian_Hardboards_Masonite_MSDS.pdf" rel="noreferrer">Material Safety Data Sheet</a> you will see Mason...
<p>Masonite or hardboard is a high-density board without a resin. It is <a href="https://www.chromaluxe.com/wp-content/uploads/SDS-Hardboard-Universal-Woods.pdf" rel="nofollow noreferrer">listed</a> at around 200 to 275 °C for its autoignition temperature. Just for comparison, let's look at similar products.</p> <p>Med...
1,240
<p>Saw a post about hidden features in C# but not a lot of people have written linq/lambdas example so... I wonder...</p> <blockquote> <p>What's the coolest (as in the most elegant) use of the C# LINQ and/or Lambdas/anonymous delegates you have ever saw/written?</p> </blockquote> <p>Bonus if it has went into produc...
<p>The <a href="http://blogs.msdn.com/lukeh/archive/2007/10/01/taking-linq-to-objects-to-extremes-a-fully-linqified-raytracer.aspx" rel="noreferrer">LINQ Raytracer</a> certainly tops my list =)</p> <p>I'm not quite sure if qualifies as elegant but it is most certainly the coolest linq-expression I've ever seen!</p> <...
<p>Working with attributes:</p> <pre><code>private void WriteMemberDescriptions(Type type) { var descriptions = from member in type.GetMembers() let attributes = member.GetAttributes&lt;DescriptionAttribute&gt;(true) let attribute = attributes.FirstOrDefault() where attribute != nul...
4,850
<p>Learning WPF nowadays. Found something new today with .Net dependency properties. What they bring to the table is </p> <ul> <li>Support for Callbacks (Validation, Change, etc) </li> <li>Property inheritance</li> <li>Attached properties </li> </ul> <p>among others.</p> <p>But my question here is why do they need...
<p>I see 2 reasons behind that requirement:</p> <ol> <li>You can't register same DP twice. To comply with this constraint you should use static variable, it will be initialized only one time thus you will register DP one time only.</li> <li>DP should be registered before any class (which uses that DB) instance created...
<p>I see 2 reasons behind that requirement:</p> <ol> <li>You can't register same DP twice. To comply with this constraint you should use static variable, it will be initialized only one time thus you will register DP one time only.</li> <li>DP should be registered before any class (which uses that DB) instance created...
5,728
<p>I'm starting to learn ruby. I'm also a day-to-day C++ dev. For C++ projects I usually go with following dir structure</p> <pre><code>/ -/bin &lt;- built binaries -/build &lt;- build time temporary object (eg. .obj, cmake intermediates) -/doc &lt;- manuals and/or Doxygen docs -/src --/module-1 --/module-2 -- ...
<p>Bundler includes the necessary infrastructure to generate a gem:</p> <pre><code>$ bundle gem --coc --mit --test=minitest --exe spider Creating gem 'spider'... MIT License enabled in config Code of conduct enabled in config create spider/Gemfile create spider/lib/spider.rb create spider/lib/spid...
<p>I would stick to something similar to what you are familiar with: there's no point being a stranger in your own project directory. :-)</p> <p>Typical things I always have are lib|src, bin, test.</p> <p>(I dislike these monster generators: the first thing I want to do with a new project is get some code down, not w...
8,028
<p><code>mime_content_type()</code> is deprecated.</p> <p>How can I find the <code>MIME type</code> of a local file using <code>PHP5</code> but without using this deprecated method or the <code>PECL fileinfo</code> extension?</p> <p>Edit: That's what I was afraid of. It's unfortunate that they deprecated a built-in ...
<p>If you can't use the fileinfo extension, and you don't want to use mime_content_type, your options are limited.</p> <p>Most likely you'll need to do a lookup based on the file extension. mime_content_type did something a bit more intelligent and actually looked for special data in the file to determine the mime ty...
<p>The <a href="http://getid3.sourceforge.met" rel="nofollow noreferrer" title="getId3">getID3()</a> library is a quick and easy works-most-of-the-time option. Originally named for a project to obtain MP3 ID3 data, the library does two hecks of a lot more than that and is quite convenient for all sorts of common or odd...
7,401
<p>What is the best way to implement mutliple Default Buttons on a ASP.NET Webform?</p> <p>I have what I think is a pretty standard page. There is a login area with user/pass field and a login button. Then elsewhere on the same page there is a single search field with a search button.</p>
<p><code>asp:Panel</code> has a property named <code>DefaultButton</code>. You just need to encapsulate your markup portions with appropriate panels and set the default buttons for each.</p>
<p>Capture the enter key press for each area of the screen and then fire the corresponding button's click even. </p>
9,761
<p>Just one quick question about the filament. </p> <p>Can I leave the filament in the extruder for a prolonged period of time while the printer is off?</p>
<p>Most filaments you can leave in the extruder indefinitely without any ill effects.</p> <p>There are some filaments that need to be stored away from moisture, particularly Nylon, because they absorb moisture from the air and don't print well if they contain a lot of absorbed moisture. However, this isn't an inherent...
<p>If you "planing" to leave the filament there for months, then it would be a good idea to store it away, but for most filaments it is not a big deal to be stay loaded... provided that the humidity is not high (e.g. a shower or kitchen next to it would be not so good). </p> <p>My experiences with "moistured" filament...
928
<p>How do you give a C# auto-property an initial value?</p> <p>I either use the constructor, or revert to the old syntax. </p> <p><strong> Using the Constructor:</strong></p> <pre><code>class Person { public Person() { Name = "Initial Name"; } public string Name { get; set; } } </code></pre>...
<p>In C# 5 and earlier, to give auto implemented properties an initial value, you have to do it in a constructor.</p> <p>Since <a href="https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-60" rel="noreferrer">C# 6.0</a>, you can specify initial value in-line. The syntax is:</p> <p...
<p>I think this would do it for ya givng SomeFlag a default of false.</p> <pre><code>private bool _SomeFlagSet = false; public bool SomeFlag { get { if (!_SomeFlagSet) SomeFlag = false; return SomeFlag; } set { if (!_SomeFlagSet) _SomeFlagSet...
6,199
<p>I'm at a loss for where to get the best information about the meaning, likely causes, and possible solutions to resolve COM errors when all you have is the HRESULT.</p> <p>Searching Google for terms like '80004027' is just about useless as it sends you to random discussion groups where 90% of the time, the question...
<p>I always use WinError.h. That has the vast majority of Windows error codes of all sorts.</p> <p>A key indicator to look out for is the Facility part of the code: the second most-significant byte. That is, 0x80nnmmmm, where nn is the Facility. That tells you which component generated the code. Anything with a facili...
<p><H2><a href="http://msdn.microsoft.com/en-us/library/ms690088.aspx" rel="nofollow noreferrer">Structure of COM Error Code</a></H2></p> <p>Second in Google results for COM Error Code.</p>
7,527
<p>I just received my E3D v6 hotend and I am installing it on the open source design of a Prusa i3. How do I clean my hotend after each print and after using different filaments?</p>
<p>Usually there is no need to clean the hotend, as filament sticks well to itself rather than to the inside of the hotend. If there are remains - the simplest way to clean it up is to extrude 5-10 cm of new filament, which will gather all remainings clean the hotend.</p> <p>The above concerns changing filament in the...
<p>Or you can use atomic nozle clianning!It woks fine for me :) <a href="https://www.youtube.com/watch?v=04T8zdgyh3E" rel="nofollow">https://www.youtube.com/watch?v=04T8zdgyh3E</a></p>
292
<p>What is actually the difference between these two casts?</p> <pre><code>SomeClass sc = (SomeClass)SomeObject; SomeClass sc2 = SomeObject as SomeClass; </code></pre> <p>Normally, shouldn't they both be explicit casts to the specified type?</p>
<p>The former will throw an exception if the source type can't be cast to the target type. The latter will result in sc2 being a null reference, but no exception.</p> <p>[Edit]</p> <p>My original answer is certainly the most pronounced difference, but as Eric Lippert <a href="http://blogs.msdn.com/ericlippert/archive...
<p>The parenthetical cast throws an exception if the cast attempt fails. The "as" cast returns null if the cast attempt fails.</p>
2,458
<p>I'll take away the obvious one here: mic and webcam support. Other than that, if you ran the Silverlight team, what would your highest priority be for Silverlight v.Next?</p> <p>Disclaimer: If we get some good responses, I'll pass them along to folks I know on the Silverlight team.</p> <p><strong>UPDATE</strong>: ...
<p>Full cross-platform support for Windows, Mac and Linux with complete feature parity for each OS. ;)</p>
<p>What about some way to be able to wrap Silverlight around AIR and be able to run it as a client in a multi platform way... I guess this is more of a request to the Adobe team rather than the Microsoft one, yet I should be cool!</p> <p>Cheers!</p>
3,788
<p>I am trying to make stencils of Japanese Kanji characters with my 3D Printer.</p> <p>I am very new to Autodesk Fusion360 so I am running into some barriers: </p> <ol> <li><p>I am having trouble sketching a rectangle and then a text character and extruding them separately. If I extrude one they both disappear. Ther...
<p>As I see it, for a stencil you want the brown part with the white part(s) cut out.</p> <p>This is easily doable. You can do this one sketch at a time, extrude it, and cut it out of the brown part.</p> <p>To connect the inner brown parts to the rest of the brown, you'll need to cut a thin rectangle in the white cha...
<p>May I suggest an alternative? Create your characters in a document editor (such as Word or OpenOffice), using a very large font size. Save the characters to an image file. Go to one of many converter sites, such as <a href="http://www.embossify.com/" rel="nofollow noreferrer">embossify</a> or <a href="https://ww...
879
<p>Is there anything similar on Windows what would achieve the same as the InputManager on OS X?</p>
<ol> <li>Require SSL on the application</li> <li>In a custom error page for the 403 redirect the browser to the incoming URL, changing http to https along the way.</li> </ol> <p>Note: Keep port 80 open for this - or there won't be a server to listen for requests to redirect.</p>
<p>Is just not accepting any connections on port 80 an option? I'm a complete web server noob so I don't know if the server can operate without an unsecured listen port but if the server can operate only listen on port 443 that would seem to be simplest option.</p> <p>Another option would be a redirect from the unsec...
5,083
<p>How to take screenshot programmically of desktop area in Mac OS X ?</p>
<p>Two interesting options I have seen, but yet to use professionally, are the screencapture utility and a MacFuse demo.</p> <p>The screencapture utility has been around since 10.2, according to the man page, and could be linked to a Cocoa application by use of NSTask.</p> <p>The MacFuse demo worked by creating a new...
<p>If you consider REALbasic, this is extremely easy to do with RB and the MBS Plugins. I've just written an application that does timed screenshots using RB and the MBS Plugins. You can read about it here: <a href="http://tektalkin.blogspot.com/2008/08/screenaudit-for-mac-osx.html" rel="nofollow noreferrer">http://...
5,993
<p>I would like to make a child class that has a method of the parent class where the method is a 'classmethod' in the child class but <strong>not</strong> in the parent class.</p> <p>Essentially, I am trying to accomplish the following:</p> <pre><code>class foo(Object): def meth1(self, val): self.value =...
<p>I'm also not entirely sure what the exact behaviour you want is, but assuming its that you want bar.meth1(42) to be equivalent to foo.meth1 being a classmethod of bar (with "self" being the class), then you can acheive this with:</p> <pre><code>def convert_to_classmethod(method): return classmethod(method.im_fu...
<p>The question, as posed, seems quite odd to me: I can't see why anyone would want to do that. It is possible that you are misunderstanding just what a "classmethod" is in Python (it's a bit different from, say, a static method in Java).</p> <p>A normal method is more-or-less just a function which takes as its first ...
9,214
<p>Has anyone implemented Lightbox style background dimming on a modal dialog box in a MFC/non .net app.<br> I think the procedure would have to be something like:</p> <p>steps:</p> <ol> <li><p>Get dialog parent HWND or CWnd* </p></li> <li><p>Get the rect of the parent window and draw an overlay with a translucen...
<p>Here's what I did* based on Brian's links<br> First create a dialog resource with the properties:</p> <ul> <li>border <strong>FALSE</strong></li> <li>3D look <strong>FALSE</strong></li> <li>client edge <strong>FALSE</strong></li> <li>Popup style</li> <li>static edge <strong>FALSE</strong></li> <li>Transparent <stro...
<p>I think you just need to create a window and set the transparency. There is an MFC <a href="http://www.codeproject.com/KB/dialog/CGlassDialog.aspx" rel="nofollow noreferrer">CGlassDialog sample on CodeProject</a> that might help you. There is also an <a href="http://www.codeproject.com/KB/winsdk/quaker1.aspx" rel="n...
7,490
<p>I'm compiling a simple .c in visual c++ with Compile as C Code (/TC) and i get this compiler error </p> <blockquote> <p>error C2143: syntax error : missing ';' before 'type'</p> </blockquote> <p>on a line that calls for a simple struct </p> <pre><code> struct foo test; </code></pre> <p>same goes for using the ...
<p>I forgot that in C you have to declare all your variables before any code.</p>
<p>How is your structure type defined? There are two ways to do it:</p> <pre><code>// This will define a typedef for S1, in both C and in C++ typedef struct { int data; int text; } S1; // This will define a typedef for S2 ONLY in C++, will create error in C. struct S2 { int data; int text; }; </...
5,579
<p>What tools would you recommend for setting up CI for build and deployment of multiple websites built on DotNetNuke using SVN for source control? </p> <p>We are currently looking at configuring Cruise Control to work with NAnt, NUnit, NCover and Trac as a test case. What other combinations would worth investigating?...
<p>We use CruiseControl with NUnit, NCover, FxCop, SVN and some custom tools we wrote ourselves to produce the reports. In my opinion it has proven (over the last few years) to be an excellent combination.</p> <p>It's frustrating that MS restricts <em>all</em> of its integration tools to VSTS. Its test framework is a...
<p>Microsoft loosened it's constraint on the Testing Platform by including it in Visual Studio 2008 Professional and allowing for the tests to be run from the command line with Framework 3.5 installed. We did a crossover for a client recently and so far they have been able to run all the tests without the need for NUni...
2,879
<p>Does anybody know any good resources for learning how to program CIL with in-depth descriptions of commands, etc.? I have looked around but not found anything particularly good.</p>
<p>The only CIL book on my shelf is <a href="https://rads.stackoverflow.com/amzn/click/com/1590596463" rel="nofollow noreferrer" rel="nofollow noreferrer">Expert .NET 2.0 IL Assembler</a> by Serge Lidin. In terms of what the individual opcodes do or mean, the Microsoft documentation on System.Reflection.Emit has some ...
<p><a href="https://rads.stackoverflow.com/amzn/click/com/1590596463" rel="nofollow noreferrer" rel="nofollow noreferrer">Expert .NET 2.0 IL Assembler by Serge Lidin</a></p> <p>There was a 1.1 version of the same book, but I haven't seen anything for the latest .NET release. It's an excellent book. I used it to wri...
6,672
<p>I'm looking for a tool which can generate a <a href="https://en.wikipedia.org/wiki/Make_(software)#Makefile" rel="nofollow noreferrer">Makefile</a> for a C/C++ project for different compilers (<a href="https://en.wikipedia.org/wiki/GNU_Compiler_Collection" rel="nofollow noreferrer">GCC</a>, <a href="https://en.wikip...
<p>Other suggestions you may want to consider:</p> <ul> <li><p><a href="http://www.scons.org/" rel="nofollow noreferrer">Scons</a> is a cross-platform, cross-compiler build library, uses Python scripting for the build systems. Used in a variety of large projects, and performs very well.</p> </li> <li><p>If you're using...
<p>One issue to consider is do you want a "makefile" creator or a replacement build system? The problem with replacement build systems is that you typically don't get good IDE integration for platforms whose users expect this (Visual C++). If you do want a makefile creator instead of a replacement build system, take a...
3,095
<p>I am working on a rails project. Using the tag observe_field, I am taking text typed into a text area, processing it in a control, and displaying the result in a div (very similar to the preview in stack overflow). Everything works fine until I type certain special chars.</p> <ol> <li>? => causes the variable not t...
<p>This is an escaping issue (as stated by others).</p> <p>You'll want to change your observe_field :with statement to something like:</p> <pre><code> :with =&gt; "'postbody=' + encodeURIComponent(value)" </code></pre> <p>Then in your controller:</p> <pre><code>def textile_to_html text = URI.unescape(params['pos...
<p>Can you provide a code sample?</p> <p>More likely than not you'll just need to escape your HTML entities using <a href="http://www.w3schools.com/jsref/jsref_encodeURI.asp" rel="nofollow noreferrer">encodeuri</a> or something like that.</p>
5,124
<p>I want to programatically create an NSTextView. How can I determine the correct frame height so that the view displays one line of text in the current default font?</p>
<p>The NSFont class has a method that can give you the size of a rectangle that would enclose a specific attributed string. Get the font used by your text view, create a string that serves as a reasonable example of what will be in the text view, and use that to inform your frame height. (The frame height will need t...
<p>It would be more normal to be using an NSTextField than an NSTextView for a single line of text.</p> <p>With NSTextField, just do the following:</p> <pre><code>[textField setFont:myFont]; [textField sizeToFit]; </code></pre> <p>Oh, and there is no built-in 'current default font'. If an application has such a con...
4,525
<p>Does anyone have any good starting points for me when looking at making web pages/sites/applications specifically for viewing on the iPhone?</p> <p>I've looked at templates like the one <a href="http://blog.wired.com/monkeybites/2007/07/meet-joe-hewitt.html" rel="noreferrer">Joe Hewitt</a> has made, and also seen s...
<p>I found <a href="http://code.google.com/p/iphone-universal/" rel="nofollow noreferrer">iphone-universal</a> on Google Code the other day. Haven't had a chance to try it out but it looks promising.</p>
<p>This <em>looks</em> good, but unfortunately it's being licensed under GPLv3, so I'm actually a bit afraid to start looking at that code. The framework I either need to find, or develop if needs be, must be able to be used as part of a commercial program, without having to license the entire program different. Commer...
3,025
<p>I know very little about the history of 3D printing, except that SLA came first (in the 1980's?), and FDM development was probably held back by patents.</p> <p>By 2016, very low price kit machines were available to hobbyists, in the &lt;€300 price range, as price-reduced clones of designs which had already seen sev...
<blockquote> <p>By 2016, very low price kit machines were available to hobbyists [..]</p> <p>Was this the start of the break-out of cheap FDM machines</p> </blockquote> <p>No, not by any means. The <a href="https://en.wikipedia.org/wiki/RepRap_project" rel="noreferrer">RepRap project</a> started in 2005, and by 2008-20...
<p>The Makerbot Replicator was released in 2012 and was the first 3D consumer-level printer that was sold only as a complete unit, not a kit. They were also well funded and had a famous Maker-Person as a founder. This seemed to coincide with wide-scale coverage of 3D printing in the media, and a big boom in the DIY s...
984
<p>Using the same <strong>sort</strong> command with the same input produces different results on different machines. How do I fix that?</p>
<p>The <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/sort.1.html" rel="nofollow noreferrer">man-page</a> on OS X says:</p> <blockquote> <p>******* WARNING ******* The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses nat...
<p>This is probably due to different settings of the <a href="http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.nls/doc/nlsgdrf/locale_env.htm" rel="nofollow noreferrer">locale environment variables</a>. <code>sort</code> will use these settings to determine how to compare strings. By settin...
4,853
<p>Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely use the full power of SQL--it would be interesting to see how to build an SQL-free application.</p>
<p>Plain text files in a filesystem</p> <ul> <li>Very simple to create and edit</li> <li>Easy for users to manipulate with simple tools (i.e. text editors, grep etc)</li> <li>Efficient storage of binary documents</li> </ul> <hr> <p>XML or JSON files on disk</p> <ul> <li>As above, but with a bit more ability to vali...
<p>One good reason not to use a relational database would be when you have a massive data set and want to do massively parallel and distributed processing on the data. The Google web index would be a perfect example of such a case. </p> <p>Hadoop also has an implementation of the <a href="http://labs.google.com/pape...
5,867
<p>Please note that this question is from 2008 and now is of only historic interest.</p> <hr> <p>What's the best way to create an iPhone application that runs in landscape mode from the start, regardless of the position of the device?</p> <p>Both programmatically and using the Interface Builder.</p>
<h1>Historic answer only. Spectacularly out of date.</h1> <p>Please note that this answer is now hugely out of date/</p> <p>This answer is <strong>only a historical curiosity</strong>.</p> <hr /> <p>Exciting news! As discovered by Andrew below, this problem has been fixed by Apple in 4.0+.</p> <p>It would appear it is ...
<p>See this answer: <a href="https://stackoverflow.com/questions/2647786/landscape-mode-only-for-iphone-or-ipad/2647807#2647807">Landscape Mode ONLY for iPhone or iPad</a></p> <ol> <li>add orientation to plist</li> <li>shouldAutorotateToInterfaceOrientation = YES in all files</li> </ol> <p>Although if you're using mi...
2,288
<p>Got a bluescreen in windows while cloning a mercurial repository.</p> <p>After reboot, I now get this message for almost all hg commands:</p> <pre> c:\src\>hg commit waiting for lock on repository c:\src\McVrsServer held by '\x00\x00\x00\x00\x00\ x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' interru...
<p>When "waiting for lock on repository", delete the repository file: <code>.hg/wlock</code> (or it may be in <code><code>.hg/store/lock</code></code>)</p> <p>When deleting the lock file, you must make sure nothing else is accessing the repository. (If the lock is a string of zeros or blank, this is almost certainly ...
<p>If it only happens on mapped drives it might be bug <a href="https://bitbucket.org/tortoisehg/thg/issue/889/cant-commit-file-over-network-share" rel="nofollow">https://bitbucket.org/tortoisehg/thg/issue/889/cant-commit-file-over-network-share</a>. Using UNC path instead of drive letter seems to sidestep the issue.</...
3,393
<p>Printing supports, either complete, or partially from PVA have not always resulted in successful prints according to my experience with the filament (used in a dual extruder Ultimaker 3 extended). But, when it works well, the surface finish is perfect as there is no gap between the PVA and PLA.</p> <p>From my experi...
<p>PETG works as support material for PLA, see video</p> <p><div class="youtube-embed"><div> <iframe width="640px" height="395px" src="https://www.youtube.com/embed/3lZlyzYJd-I?start=12"></iframe> </div></div></p> <p>In theory, PLA printed on top of PETG will be fine because PETG softens a...
<p>While it is most certainly possible to use PETG as a support material, you might run into some trouble when the first layer of PETG goes down on top of the PLA. Since PETG prints so much hotter than PLA, the PETG may bond too aggressively to the PLA causing it to become very difficult to remove after the print has f...
1,693
<p>What are the best practices in setting up a new instance of TFS 2008 Workgroup edition? </p> <p>Specifically, the constraints are as follows:</p> <ul> <li>Must install on an existing Windows Server 2008 64 bit</li> <li>TFS application layer is 32 bit only</li> </ul> <p>Should I install SQL Server 2008, Sharepoin...
<p>This is my recipe for installing TFS 2008 SP1. </p> <p>There is no domain controller in this scenario, we are only a couple of users. If I was to do it again, I would consider changing our environement to use a active directory domain.</p> <ul> <li>Host Server running Windows Server 2008 with 8GB RAM and quad pro...
<p>I just upgraded our team to TFS 2008, from TFS 2005. The hardest part was upgrading SharePoint 2.0 to 3.0, so I would make sure to do that first, if you have not already installed TFS 2008. We had a couple of other difficulties, but they were all either related to the SharePoint upgrade, or to the fact that we were ...
5,254
<p>I need to find a bottleneck and need to accurately as possible measure time.</p> <p>Is the following code snippet the best way to measure the performance?</p> <pre><code>DateTime startTime = DateTime.Now; // Some execution process DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startT...
<p>No, it's not. Use the <a href="http://msdn2.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx" rel="noreferrer">Stopwatch</a> (in <code>System.Diagnostics</code>)</p> <pre><code>Stopwatch sw = Stopwatch.StartNew(); PerformWork(); sw.Stop(); Console.WriteLine("Time taken: {0}ms", sw.Elapsed.TotalMillise...
<p>Since I do not care to much about precision I ended up comparing them. I am capturing lots of packets on the network and I want to place the time when I receive each packet. Here is the code that tests 5 million iterations</p> <pre><code> int iterations = 5000000; // Test using datetime.now { var...
4,824
<p>From a desktop application developer point of view, is there any difference between developing for Windows XP and developing for Windows Vista?</p>
<p><strong>User Interface</strong></p> <p>Looking at the <a href="http://msdn.microsoft.com/en-us/library/aa511258.aspx" rel="nofollow noreferrer">Windows Vista User Experience Guidelines</a> you can see that they have changed many UI elements, which you should be aware of. Some major things to take note of:</p> <ul...
<p>By far the most painful part of moving an application from XP to Vista (from my point of view) is dealing with the numerous services and IPv6 stuff that uses ports which were previously free, and dealing with the Wireless Provisioning -> Native WiFi transition.</p> <p>The UAC stuff is basically a moot point; there ...
4,268
<p>Do I risk losing sales by disabling SSL 2.0 and PCT 1.0 in IIS5?</p> <p>Clarification: Sales would be lost by client not being able to connect via SSL to complete ecommerce transaction because SSL 2.0 or PCT 1.0 is disabled on the web server. </p> <p>Microsoft kbase article: <a href="http://support.microsoft.com/k...
<p>Modern browsers either don't appear to support SSLv2 at all (Google Chrome, Opera 9.52, Firefox) or have it disabled by default (IE7, IE8).</p> <p>That said, are you concerned about losing business from people using much-less-than-modern web browsers?</p> <p>Possibly more importantly, are you concerned about your ...
<p>Presumably you use SSL to protect users from man-in-the-middle or other attacks, yes? SSLv2 is useless for this. Disable it -- the number of users who use a browser without SSLv3 or TLS support is vanishingly small, and it's easier to make them somebody else's problem than explain why somebody in Nigeria is using th...
9,020
<p>How can a .net class library project and resulting dll be protected so it cant be referenced by other applications (.net projects) except those projects in my own solution?</p>
<p>I think you can't forbid other applications to reference you library.<br> You can make library's classes internal and provide access to them via <a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" rel="nofollow noreferrer">InternalVisibleTo</a> attribute...
<p>Forgive my ignorance, but if they're all class libraries, what does the code do? Isn't the purpose of having a dll so that the code can be referenced.</p> <p>In any case if you mark everything <a href="http://msdn.microsoft.com/en-us/library/7c5ka91b.aspx" rel="nofollow noreferrer"><code>internal</code></a> it won...
6,022
<p>I've been trying to get something decent printed for days but nothing works! I have a Tarantula Tevo i3 <code>MKS Base V1.4</code> and have done a lot of trial &amp; plenty of error. Still I am puzzled to get good prints.</p> <ol> <li>What is the stock firmware for a single extruder regular/large bed firmware &amp;...
<h2>Answer for <strong>"2)"</strong>:</h2> <p>The default firmware seems to be Repetier. It also includes Bed leveling (see documentation): <a href="https://www.repetier.com/documentation/repetier-firmware/z-probing/" rel="nofollow noreferrer">https://www.repetier.com/documentation/repetier-firmware/z-probing/</a></p>...
<p>Tevo Tarantula i3 owners on FaceBook is where I got marlin 2.0. Other things I tried didn't work, but this is working fine if you just want to add auto bed leveling using the standard SN04 sensor.</p>
686
<p>I've been playing around with the ASP.NET MVC Framework and the one thing that's really confusing me is how I'm meant to do server side validation of posted form data. I presume I don't post back to the same URL, but if I don't, how do I redisplay the form with the entered data and error messages? Also, where shou...
<p>Here's an overview of the flow in MVC:</p> <ol> <li>/new - render your "New" view containing a form for the user to fill out <ul> <li>User fills out form and it is posted to /create</li> <li>The post is routed to the Create action on your controller</li> <li>In your action method, update the model with the data th...
<p>I'm just learning the MVC framework too so I'm not sure how off this is, but from what I understand you would have a form on a View such as Edit.aspx. This form would then post to the controller to another action method such as Update() passing in the contents of the form that you set in Edit.aspx as parameters.</p...
3,150
<p>I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors and I want to add a button for reverting to default color settings. How can I read the default settings?</p> <p>For example:</p> <ol> <li>I ha...
<p>@ozgur,</p> <pre><code>Settings.Default.Properties["property"].DefaultValue // initial value from config file </code></pre> <p>Example:</p> <pre><code>string foo = Settings.Default.Foo; // Foo = "Foo" by default Settings.Default.Foo = "Boo"; Settings.Default.Save(); string modifiedValue = Settings.Default.Foo; //...
<blockquote> <p>How do I go back to Color.White?</p> </blockquote> <p>Two ways you can do:</p> <ul> <li>Save a copy of the settings before the user changes it.</li> <li>Cache the user modified settings and save it to Properties.Settings before the application closes.</li> </ul>
7,178
<p>Any suggestions? Using visual studio in C#.</p> <p>Are there any specific tools to use or methods to approach this?</p> <h3>Update:</h3> <p>Sorry, I should have been a little more specific. I am using ASP.Net 2.0 and was looking more for a tool like jUnit for Java. I took a look at NUnit and NUnitAsp and that looks...
<p>Boy, that's a pretty general question. I'll do my best, but be prepared to see me miss by a mile.</p> <p>Assumptions</p> <ol> <li>You are using ASP.NET, not plain ASP</li> <li>You don't really want to test your web pages, but the <strong>logic</strong> behind them. Unit testing the actual .ASPX pages is rather pa...
<p>There was a screencast series a year or so ago on Polymorphic Podcast that did a pretty good intro walkthrough of an MVP implementation in ASP.NET. Implemented this way, unit tests fall into place much more naturally.</p> <p><a href="http://polymorphicpodcast.com/shows/mv-patterns/" rel="noreferrer">http://polymor...
2,637
<p>So I just got a Da-Vinci 3-in-1 Junior Pro 3D Printer, and was excited to start printing my first model.</p> <p>When I open my .STL File in the XYZWare that comes with the printer, and click print, it says that the cartridge inserted into my printer in not genuine, and that it won't print until I order a genuine ca...
<p>A <a href="https://www.google.nl/search?q=Da-Vinci+3-in-1+Junior+Pro+3D+does+not+recognise+genuine+cartridge&amp;rlz=1C1GCEA_en&amp;oq=Da-Vinci+3-in-1+Junior+Pro+3D+does+not+recognise+genuine+cartridge&amp;aqs=chrome..69i57.13982j0j7&amp;sourceid=chrome&amp;ie=UTF-8" rel="noreferrer">quick search on the internet</a>...
<p>A <a href="https://www.google.nl/search?q=Da-Vinci+3-in-1+Junior+Pro+3D+does+not+recognise+genuine+cartridge&amp;rlz=1C1GCEA_en&amp;oq=Da-Vinci+3-in-1+Junior+Pro+3D+does+not+recognise+genuine+cartridge&amp;aqs=chrome..69i57.13982j0j7&amp;sourceid=chrome&amp;ie=UTF-8" rel="noreferrer">quick search on the internet</a>...
1,107
<p>I am doing laboratory experiments and need to print some components.</p> <p>I am working with different aqueous (water) solutions containing sulphuric acid (H<sub>2</sub>SO<sub>4</sub>), hydrochloric acid (HCl), and hydrogen peroxide (H<sub>2</sub>O<sub>2</sub>), separately and in combination. The pH of the solutio...
<p>There are two issues you have here, one is temperature stability and the other is chemical reactivity of plastics. I can't help you with the chemistry side, but I can help with the temperature.</p> <h1>Application 1 (Temp &lt; 40 °C)</h1> <p>Any FDM plastic will perform reasonably well under these temperatures. I wo...
<p>There are two issues you have here, one is temperature stability and the other is chemical reactivity of plastics. I can't help you with the chemistry side, but I can help with the temperature.</p> <h1>Application 1 (Temp &lt; 40 °C)</h1> <p>Any FDM plastic will perform reasonably well under these temperatures. I wo...
567
<p>For general protocol message exchange, which can tolerate some packet loss. How much more efficient is UDP over TCP?</p>
<p>UDP is faster than TCP, and the simple reason is because its non-existent acknowledge packet (ACK) that permits a continuous packet stream, instead of TCP that acknowledges a set of packets, calculated by using the TCP window size and round-trip time (RTT).</p> <p>For more information, I recommend the simple, but v...
<p>The network setup is crucial for any measurements. It makes a huge difference, if you are communicating via sockets on your local machine or with the other end of the world. </p> <p>Three things I want to add to the discussion:</p> <ol> <li>You can find <a href="http://gafferongames.com/networking-for-game-program...
7,024
<p>When I print parts in ABS, acetone vapour smoothing is a good technique to get a smooth finish. Is there an equivalent solvent or process for parts printed in ASA? Ideally I'm looking for something as easy to obtain as acetone, and not so awful a chemical that I wouldn't want to work with it, but I'd still be curiou...
<p><a href="https://en.wikipedia.org/wiki/Acrylonitrile_styrene_acrylate" rel="nofollow noreferrer">ASA</a> is Acrylonitrile styrene acrylate. According to Wikipedia:</p> <blockquote> <p>ASA can be solvent-welded, using e.g. cyclohexane, 1,2-dichloroethane, methylene chloride, or 2-butanone. Such solvents can also join...
<p>From <a href="https://www.simplify3d.com/support/materials-guide/asa/" rel="nofollow noreferrer">Simplify3D - ASA</a>:</p> <blockquote> <p>ASA can be smoothed using controlled exposure to acetone vapors (a process called “vapor smoothing”).</p> </blockquote>
1,392
<p>What is a recommended architecture for providing storage for a dynamic logical database schema?</p> <p>To clarify: Where a system is required to provide storage for a model whose schema may be extended or altered by its users once in production, what are some good technologies, database models or storage engines th...
<p>What you are proposing is not new. Plenty of people have tried it... most have found that they chase "infinite" flexibility and instead end up with much, much less than that. It's the "roach motel" of database designs -- data goes in, but it's almost impossible to get it out. Try and conceptualize writing the code f...
<p>sql already provides a way to change your schema: the ALTER command.</p> <p>simply have a table that lists the fields that users are not allowed to change, and write a nice interface for ALTER.</p>
9,190
<p>I have an Ender 3 Pro modded with the Hero Me Gen 6 air ducts, installed a Creality 4.2.7 mainboard, and updated Marlin firmware to the latest for now 2.1.1 version. I'm printing with PLA only.</p> <p>It was printing well enough. The nozzle started to wear down so I replaced the nozzle (standard brass one) but also ...
<p>I would go back to the brass nozzle and try again for comparison.</p> <p>We had a batch of 10 cheap steel nozzles all of which caused problems.</p>
<p>I think the answer is printing temperature. This shiny PLA I'm using is Eryone Silk PLA. Although the working temperature is stated as 190-220 °C, my 205 °C was too much for it. A temperature of 190-195 °C produces good results though not as shiny anymore. It is three layers printed on the sample below with no probl...
2,221
<p>Need to show a credits screen where I want to acknowledge the many contributors to my application. </p> <p>Want it to be an automatically scrolling box, much like the credits roll at the end of the film.</p>
<p>A easy-to-use snippet would be to make a multiline textbox. With a timer you may insert line after line and scroll to the end after that:</p> <pre><code>textbox1.SelectionStart = textbox1.Text.Length; textbox1.ScrollToCaret(); textbox1.Refresh(); </code></pre> <p>Not the best method but it's simple and working. Th...
<p>A quick and dirty method would be to use a Panel with a long list of Label controls on it that list out the various people and contributions. Then you need to set the Panel to be AutoScroll so that it has a vertical scrollbar because the list of labels goes past the bottom of the displayed Panel. Then add a time tha...
8,847
<p>I've included a mobile web form in my asp.net project, I thought that it could/should be seen just for my mobile users but I realize that it can also be seen from any browser, I don't see problem there cause I could diff the access using HttpBrowserCapabilities.IsMobileDevice=true and transferring to the appropiate ...
<p>Some are not recognized, because the UserAgent has been messed with or a new browser is being used. Such as Opera Mobile 9.5. To fix this you need to create a Browser (*.browser) file specifically for defining this. I had to do it for the new Mozilla based UserAgent that is being sent from Google.</p>
<p>I think you should use other DDR better than Microsoft Browser Capabilities. I´m using http://wurfl.sourceforge.net>WURFL, it is open source and maybe it is more extended and updated. There is other commercial DDRs like <a href="http://deviceatlas.com/" rel="nofollow noreferrer">DeviceAtlas</a>.</p> <p>There is man...
3,422
<p>I have never much cared about self intersecting meshes when slicing with Cura. Geometry like the one below are often practical. I for instance add lots of rivets that self intersect with the base geometry:</p> <p><a href="https://i.stack.imgur.com/cRZqk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cRZq...
<p>Self intersecting meshes are considered dirty, yes. The reason you haven't had trouble before is probably that the software you were using was cleaning your mesh for you, behind the scenes. Generally speaking, these meshes can be cleaned without too much trouble by software like netfabb (<a href="https://www.netfabb...
<p>You can download MeshLab from <a href="https://sourceforge.net/projects/meshlab/" rel="nofollow noreferrer">https://sourceforge.net/projects/meshlab/</a> and use it to head stls.</p> <p>This video has healing instructions: <a href="https://www.youtube.com/watch?v=eLGIRAgLz4w" rel="nofollow noreferrer">https://www.y...
467
<p>What graphics toolkit is used for the Window's Google Talk application?</p>
<p>There isn't much information on this out there but it seems to be their own customized controls plus an IE component (and not Qt like Google Earth). <a href="http://www.customizetalk.com/forums/viewtopic.php?t=841&amp;postdays=0&amp;postorder=asc&amp;start=0" rel="nofollow noreferrer">This forum thread</a> has a lit...
<p>I'm not positive but I believe it's QT. </p>
5,505
<p>I recently got a Dremel 3D20, and I understand it only takes PLA filament according to the Dremel site. However, I was wondering if anyone has successfully used TPU filament or knows it will work fine. I’m more than happy to use other software to change the temperature, I just don’t want to gunk up or otherwise ru...
<p>TPU wants in general two things of your printer:</p> <ul> <li>A Printing Temperature of (over many makers) 195-230 °C</li> <li>A Direct Drive (extruder on the printhead)</li> </ul> <blockquote> <p>Bowden extruders are not ideal for printing flexible filaments such as NinjaFlex due to the excessive distance bet...
<p>I've never used a Dremel printer, thus I cannot guarantee that my solution will work fine, but you might want to give a try to the <a href="https://ultimaker.com/en/products/ultimaker-cura-software" rel="nofollow noreferrer">Ultimaker Cura</a> slicer. </p> <p>Ultimaker printers have Bowden tubes, like the Dremel, u...
1,156
<p>When using IE, you cannot put an absolutely positioned div over a select input element. That's because the select element is considered an ActiveX object and is on top of every HTML element in the page.</p> <p>I already saw people hiding selects when opening a popup div, that leads to pretty bad user experience hav...
<p>I don't know anything better than an Iframe</p> <p>But it does occur to me that this could be added in JS by looking for a couple of variables </p> <ol> <li>IE 6</li> <li>A high Z-Index (you tend to have to set a z-index if you are floating a div over)</li> <li>A box element</li> </ol> <p>Then a script that looks...
<p>I don't think there is. I've tried to solve this problem at my job. Hiding the select control was the best we could come up with (being a corporate shop with a captive audience, user experience doesn't usually factor into the PM's decisions). </p> <p>From what I could gather online when looking for a solution, ther...
2,949
<p>I'm trying to set the group type for a new Active Directory Entry via VB.NET and DirectoryServices to create a distribution list.</p> <p>How do I access the ADS_GROUP_TYPE enumerations?</p> <p>Specifically I'm after ADS_GROUP_TYPE_GLOBAL_GROUP.</p>
<p>You're correct, you can't actually get access to the enumerations. </p> <p>Just a wee nitpick, this constant doesn't need to be an object, you can make it an int32 -</p> <p>Const ADS_GROUP_TYPE_GLOBAL_GROUP As Object = &amp;H2</p>
<p>I don't think I can access the enumerations via .NET so instead I created the specific constant I needed. For what it's worth here's my code:</p> <blockquote> <pre><code> Const ADS_GROUP_TYPE_GLOBAL_GROUP As Object = &amp;H2 adNewGroup.Properties("groupType").Value = ADS_GROUP_TYPE_GLOBAL_GROUP </cod...
3,098
<p>I have a Tevo Tornado that I've outfitted with an official BL-Touch auto level sensor. I can see the bed probing run, and I can see the Z axis slowly adjust during x/y moves, so it's doing <em>something</em>. However, you can see that there appears to be a systematic tilt:</p> <p><a href="https://i.stack.imgur.com/...
<p>The problem with the Tevo Tornado design is that the design is as such that the Z-axis is powered by a single stepper (under the assumption that you have not added a second Z stepper).</p> <p>This means that the level relies on the rigidity of the X-axis assembly, more specific the play on the guide wheels. Apparen...
<p>I know this is incredibly old at this point, but in case anyone stumbles upon this post like I did, I wanted to point out that there is no semicolon behind your G29 code, so it's not being read properly</p>
1,316
<p>What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site?</p> <p>Thanks!</p>
<p>Nettuts has a great introduction to web-developement for iPhone. You find it <a href="http://nettuts.com/misc/learn-how-to-develop-for-the-iphone/" rel="nofollow noreferrer">here</a></p> <p>This is the specific code you asked for (taken from that article):</p> <pre><code>&lt;!--#if expr="(${HTTP_USER_AGENT} = /iPh...
<p>Better Solution:</p> <pre><code>* (NSString *)flattenHTML:(NSString *)html { NSScanner *theScanner; NSString *text = nil; theScanner = [NSScanner scannerWithString:html]; while ([theScanner isAtEnd] == NO) { // find start of tag [theScanner scanUpToString:@"&lt;" intoString:NULL] ; // find end...
7,579
<p>I need to diff two log files but ignore the time stamp part of each line (the first 12 characters to be exact). Is there a good tool, or a clever awk command, that could help me out?</p>
<p>Depending on the shell you are using, you can turn the approach <a href="https://stackoverflow.com/questions/44019/an-easy-way-to-diff-log-files-ignoring-the-time-stamps#44028">@Blair</a> suggested into a 1-liner</p> <pre><code>diff &lt;(cut -b13- file1) &lt;(cut -b13- file2) </code></pre> <p>(+1 to <a href="https...
<p>I want to propose a solution for Visual Studio Code:</p> <ol> <li>Install this extension - <a href="https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff" rel="nofollow noreferrer">https://marketplace.visualstudio.com/items?itemName=ryu1kn.partial-diff</a></li> <li>Configure it like this - <a href=...
6,565
<p>What do you do if members of your team are not cooperative during scrum meetings? They either provide a very high level definition of what they are currently working on, ("working on feature x"), or go into extremely irrelevant details, <strong>in spite of being well educated in SCRUM methodology</strong>. This caus...
<p>First of all... make sure folks are standing up... and not even leaning on the wall or a desk.</p> <p>At a high level, I would say that, whenever you face issues on the team, the best response is to <em>ask the team</em> for solutions. However, here are some of the techniques I've used for the issues you're facing....
<p>Ask for the specific details you need. People won't be aware of stuff you are interested in.</p> <p>Also try to put forth some guidelines for better and effective presentation before the meeting.</p>
9,647
<p>I've just come across this in a WHERE clause:</p> <pre><code>AND NOT (t.id = @id) </code></pre> <p>How does this compare with:</p> <pre><code>AND t.id != @id </code></pre> <p>Or with:</p> <pre><code>AND t.id &lt;&gt; @id </code></pre> <p>I'd always write the latter myself, but clearly someone else thinks diffe...
<p>These 3 will get the same exact execution plan</p> <pre><code>declare @id varchar(40) select @id = '172-32-1176' select * from authors where au_id &lt;&gt; @id select * from authors where au_id != @id select * from authors where not (au_id = @id) </code></pre> <p>It will also depend on the selectivity of the in...
<p>There will be no performance hit, both statements are perfectly equal.</p> <p>HTH</p>
2,944