instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I have IIS 5.1 installed on Windows XP Pro SP2. Besides I have installed VS 2008 Express with .NET 3.5. So obviously IIS is configured for ASP.NET automatically for .NET 3.5</p> <p>The problem is whenever I access <a href="http://localhost" rel="noreferrer">http://localhost</a> IE &amp; Firefox both presents authen...
<p>This is most likely a NT file permissions problem. IUSR_ needs to have file system permissions to read whatever file you're requesting (like /inetpub/wwwroot/index.htm).<p>If you still have trouble, check the IIS logs, typically at \windows\system32\logfiles\W3SVC*.</p>
<p>What worked for me is ,,,</p> <p>Click Start>control panel>Administrative Tools>Internet Information Services</p> <p>Expand the left tree, right-click your WebSite>Properties</p> <p>Click on Directory Security, then in "Anonymous access and authentication control" click on Edit</p> <p>Enable Anonymous access>bro...
7,691
<p>I have an existing application that is written in C++ for Windows. This application uses the Win32 CryptoAPI to generate a TripleDES session key for encrypting/decrypting data. We're using the <a href="http://www.phdcc.com/cryptorc4.htm" rel="nofollow noreferrer">exponent of one trick</a> to export the session key o...
<h2>Intro</h2> <p>I'm Finally getting around to posting the solution. I hope it provides some help to others out there that might be doing similar type things. There really isn't much reference to doing this elsewhere.</p> <h2>Prerequisites</h2> <p>In order for a lot of this to make sense it's necessary to read the ...
<p>Ok, forget the last answer I can't read :) You are working with 3Des keys not RSA keys.</p> <p>I worked on a bunch of code to share keys between .NET, CryptoAPI and openssl. Found a lot of good example code here for doing the key conversions: </p> <p><a href="http://www.jensign.com/JavaScience/cryptoutils/index.ht...
7,169
<p>Faulty endstop caused the printer (a traditional cartesian FDM) to try to move over the maximum axis limit at top, the noise has been atrocious, I don't see damages (apparently) but I'm wondering if this could have damaged something or the motors aren't strong enough to do any serious physical damage to mechanics of...
<p>It's highly unlikely this crash caused any physical or electrical damage to your printer. Printers are designed to be able to withstand an occasional crash as typically, no Axis Maximum endstops are installed. The 'atrocious' noise you describe hearing is the sound of the stepper motor having lost (or, in this case,...
<p>The noise you heard was likely caused by the extruder keeping turning, resulting in the belt stretching enough to jump a tooth or more. I guess it was like &quot;TRRRRR&quot;.</p> <p>If the belt tension is properly set (not too tight), no damage can be caused. In fact, the belt should be loose enough so that such a ...
2,085
<p>I am re-writing this question because, well, it needs to be updated.</p> <p>I have the Anet A6, but in a general sense of things, what kind of threads can I produce before it no longer works? </p>
<p>This depends on the nozzle diameter, the layer thickness, and the material. </p> <p>I've made very good M8 and acceptable M6 threads (nut and bolt) at 0.2mm layers with a 0.5mm nozzle, out of ABS, and also out of PETG. </p>
<p>I have found that I get slightly different results with different printers and different plastics and print temperatures. For doing parts like nuts and bolts you will probably have to print several prototype parts once you get your printer to get the setting and tolerances right, once you get a print. But just decre...
710
<p>Would using WSDualHttpBinding for duplex callbacks work in real-world scenarios? Say, I have a .NET application that uses a random port, would the service be able to resolve the client's base addresses and port for callbacks?</p>
<p>A complete answer to your question depends on the "real-world scenario" being either an Intranet or an Internet scenario. Although WSDualHttpBinding works in both scenarios there are specifics to be aware of:</p> <p><strong>Intranet</strong></p> <p>WSDualHttpBinding will work with your .NET application using a pr...
<p>If it's an application behind a firewall, theoretically yes. It depends on what you mean by "real world"; if by that you mean "high performance" perhaps NetTcpBinding is a better appraoch.</p>
8,435
<p>I recently discovered this kit after reading this Instructables, <a href="https://www.instructables.com/id/Adding-More-Extruders-to-Any-3d-Printer/" rel="nofollow noreferrer">Adding More Extruders to Any 3d Printer</a>: </p> <blockquote> <p><a href="https://i.stack.imgur.com/Lq4uQ.png" rel="nofollow noreferrer" t...
<p>The <a href="http://www.robotrebels.org/index.php?topic=769.0" rel="nofollow noreferrer">MKS Gen L v1.0</a> Board you are using does support microcontroller controlled fans without doing some surface level modification to the board via the <code>D9/FAN</code>. The port you marked FAN is not a controllable port, it r...
<p>You can use the <code>M42</code> g-code to manually set any supported digital pin, which can then be used to either enable one of the on-board MOSFETs (D7, D8, D9, D10) or an external MOSFET. For example, <code>M42 P9 S255</code> would enable the parts cooling fan at 100&nbsp;%.</p> <p>You should never run any fan ...
1,397
<p>This is a follow up question for <a href="https://3dprinting.stackexchange.com/q/20196/20803">What are viable substitutes for Raspberry Pi to run Octoprint or similar software for Prusa i3 MK3S+?</a></p> <p>I was able to grab Raspberry Pi 400 for around $70, so <a href="https://www.raspberrypi.com/news/raspberry-pi-...
<p>The recommended hardware for OctoPi is <a href="https://octoprint.org/download/" rel="nofollow noreferrer">listed</a> as:</p> <blockquote> <p>Recommended hardware: Raspberry Pi 3B, 3B+, 4B or Zero 2. Expect print artifacts and long loading times with other options, especially when adding a webcam or installing third...
<p>While the server will work, there are some challenges.</p> <p>Raspberry Pi 400 lacks the camera and screen connectors, specifically:</p> <ul> <li>2-lane MIPI DSI display port</li> <li>2-lane MIPI CSI camera port</li> </ul> <p>so you can't use Pi screens and camera modules. You need to find compatible USB webcam if y...
2,229
<p>Disclaimer: Near zero with marshalling concepts..</p> <p>I have a struct B that contains a string + an array of structs C. I need to send this across the giant interop chasm to a COM - C++ consumer.<br> <strong>What are the right set of attributes I need to decorate my struct definition ?</strong> </p> <pre><code...
<p><a href="http://msdn.microsoft.com/en-us/library/ms379617%28VS.80%29.aspx#vs05cplus_topic12" rel="nofollow noreferrer">C++: The Most Powerful Language for .NET Framework Programming</a></p> <p>I was about to approach a project that needed to marshal structured data across the C++/C# boundary, but I found what could...
<p>The answer depends on what the native definitions are that you are trying to marshal too. You haven't provided enough information for anyone to be able to really help.</p> <p>A common thing that trips people up when marshalling strings in native arrays is that native arrays often use a fixed-size buffer for the st...
5,176
<p>Does the Java language have delegate features, similar to how C# has support for delegates?</p>
<p>Not really, no.</p> <p>You may be able to achieve the same effect by using reflection to get Method objects you can then invoke, and the other way is to create an interface with a single 'invoke' or 'execute' method, and then instantiate them to call the method your interested in (i.e. using an anonymous inner class...
<p>Java doesn't have delegates and is proud of it :). From what I read here I found in essence 2 ways to fake delegates: 1. reflection; 2. inner class</p> <p>Reflections are slooooow! Inner class does not cover the simplest use-case: sort function. Do not want to go into details, but the solution with inner class basi...
6,668
<p>I'm learning XML, currently of Wikibooks, but that is kinda huge and not oversee-able...</p> <p>anybody know a better place?</p>
<p><a href="http://www.w3schools.com/xml/default.asp" rel="noreferrer">W3Schools</a> are generally good for this type of stuff.</p>
<p>Even though there are plenty of tutorials about XML , I agree with Galwegian . I learned XML from <a href="http://www.w3schools.com/xml/default.asp" rel="nofollow noreferrer">W3Schools</a>.</p>
9,709
<p>I have a generic Repository&lt;T&gt; class I want to use with an ObjectDataSource. Repository&lt;T&gt; lives in a separate project called DataAccess. According to <a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/767f1a821d9b23da/b1e045958ae427a5?lnk=st#b1e045958ae...
<p>Do something like this.</p> <pre><code>Type type = typeof(Repository&lt;MessageCategory); string assemblyQualifiedName = type.AssemblyQualifiedName; </code></pre> <p>get the value of assemblyQualifiedName and paste it into the TypeName field. Note that Type.GetType(string), the value passed in must be</p> <blockq...
<p>Darren,</p> <p>Many, many thanks for your post. I've been fighting with this all day. Strangely, in my case, I need to double the square brackets, e.g. for your piece of code:</p> <p>MyProject.Repository`1[[MyProject.MessageCategory, DataAccess, Version=1.0.0.0, Culture=neutral, PublicKey=null]], DataAccess, Versi...
7,636
<p>I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have?</p> <p>I am only familiar with PHP</p>
<p>As far as I remember there is an xml element for the image data. You can use this <a href="http://www.motobit.com/util/base64-decoder-encoder.asp" rel="noreferrer">website</a> to encode a file (use the upload field). Then just copy and paste the data to the XML element.</p> <p>You could also use PHP to do this like...
<p>Google led me to <a href="http://fr.php.net/base64_encode" rel="nofollow noreferrer">this</a> solution (base64_encode). Hope this helps!</p>
5,646
<p>This question comes on the heels of the question asked <a href="https://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marke">here</a>.</p> <p>The email that comes from our web server comes from an IP address that is different than that for the Exchange ser...
<p>The use of <code>System.exit</code> is frowned upon when the 'application' is really a sub-application (e.g. servlet, applet) of a larger Java application (server): in this case the <code>System.exit</code> could stop the JVM and hence also all other sub-applications. In this situation, throwing an appropriate excep...
<p>It's frowned upon for <em>normal</em> exits. If "not everything is going according to plan", then System.exit is fine.</p> <p>Update: I should add that I assume your '1' has meaning that is documented somewhere.</p>
5,280
<p>I am working on a new project. Is there any benefit with going with a WCF web service over a regular old fashion web service?</p> <p>Visual Studio offers templates for both. What are the differences? Pros and cons?</p>
<p>What is a "regular old fashioned web service?" An ASMX service, or are you using WSE as well? ASMX services are not naturally interoperable, don't support WS-* specs, and ASMX is a technology that is aging very quickly. WSE (Web Service Enhancements) services DO add support for WS-* and can be made to be interoperab...
<p>In my experience</p> <p><strong>WCF</strong></p> <p>It is absurdly verbose to work with it, it is not quite compatible with other microsoft products and, of course, it is not widely accepted outside ot the microsoft world.</p> <p>But my main problem is it is not stable, it trends to fail (in some situation) and i...
2,841
<p>My dilemma is, basically, how to share an enumeration between two applications.</p> <p>The users upload documents through a front-end application that is on the web. This application calls a web service of the back-end application and passes the document to it. The back-end app saves the document and inserts a row ...
<p>I'd suggest against passing an integer between them, simply for purposes of readability and debugging. Say you're going through your logs and you see a bunch of 500 errors for DocumentType=4. Now you've got to go look up which DocumentType is 4. Or if one of the applications refers to a number that doesn't exist ...
<p>I've noticed that when using "Add Service Reference" as opposed to "Add Web Reference" from VS.net, the actual enum values come across as well as the enum names. This is really annoying as I need to support both 2.0 and 3.5 clients. I end up having to go into the 2.0 generated web service proxy code and manually a...
2,402
<p>This is a bit of a weird question, and I imagine the answer might simply be "no." But here goes anyway:</p> <p>I'm writing some code that generates shapes for 3D printing via "implicit surfaces," i.e. a mathematical function f(x,y,z) that is positive inside the shape and negative outside it. This works pretty well ...
<h2>No, not natively</h2> <p>To the current point, all slicers in frequent use do use some kind of 3D model with explicit surfaces to cut up into slices and then solve the path functions to create the G-code. The model can be in STL or OBJ or some other format, depending on the slicer, but at this point (November 2019)...
<p>This is a partial answer that I might make into a full answer if I follow it up later. (I'm posting in case someone else has the same question, in which case this might be helpful despite being incomplete.)</p> <p>It seems that the 3mf format has a <a href="https://github.com/3MFConsortium/spec_slice/blob/master/3M...
1,400
<p>GDI+ DrawLines function has a clipping bug that can be reproduced by running the following c# code. When running the code, two line paths appear, that should be identical, because both of them are inside the clipping region. But when the clipping region is set, one of the line segment is not drawn. </p> <pre><code...
<p>It appears that this is a known bug...</p> <p>The following code appears to function as you requested:</p> <pre><code>protected override void OnPaint(PaintEventArgs e) { PointF[] points = new PointF[] { new PointF(73.36f, 196), new PointF(75.44f, 32), new PointF(77.52f, 32), ...
<p>What appears to be the matter with the code?</p> <p>OK, the question should be... what should the code do that it doesn't already.</p> <p>When I run the code, I see 2 red 'spikes' am I not ment to?</p> <p>You appear to draw the first spike within the clipped rectangle region verified by adding the the following a...
3,628
<p>I am learning Python for a class now, and we just covered tuples as one of the data types. I read the Wikipedia page on it, but, I could not figure out where such a data type would be useful in practice. Can I have some examples, perhaps in Python, where an immutable set of numbers would be needed? How is this diffe...
<ul> <li>Tuples are used whenever you want to return multiple results from a function.</li> <li>Since they're immutable, they can be used as keys for a dictionary (lists can't).</li> </ul>
<p>In addition to the places where they're syntactically required like the string % operation and for multiple return values, I use tuples as a form of lightweight classes. For example, suppose you have an object that passes out an opaque cookie to a caller from one method which is then passed into another method. A ...
6,344
<p>How do I create a branch in SVN?</p>
<p>Branching in Subversion is facilitated by a very very light and efficient copying facility.</p> <p>Branching and tagging are effectively the same. Just copy a whole folder in the repository to somewhere else in the repository using the <code>svn copy</code> command.</p> <p>Basically this means that it is by conven...
<p>Below are the steps to create a branch from trunk using TortoiseSVN in windows machine. This obviously needs TortoiseSVN client to be installed.</p> <ol> <li>Right Click on updated trunk from local windows machine</li> <li>Select TortoiseSVN</li> <li>Click branch/Tag</li> <li>Select the To path in SVN repository. N...
2,425
<p>I have 150+ SQL queries in separate text files that I need to analyze (just the actual SQL code, not the data results) in order to identify all column names and table names used. Preferably with the number of times each column and table makes an appearance. Writing a brand new SQL parsing program is trickier than is...
<p>I actually ended up using a tool called <a href="http://www.dpriver.com/pp/sqlformat.htm" rel="noreferrer">SQL Pretty Printer</a>. You can purchase a desktop version, but I just used the free online application. Just copy the query into the text box, set the Output to "List DB Object" and click the Format SQL butto...
<p>Please go with antlr... Write a grammar n follow the steps..which is given in antlr site..eventually you will get AST(abstract syntax tree). For the given query... we can traverse through this and bring all table ,column which is present in the query..</p>
8,069
<p>I know how to test an object to see if it is of a type, using the IS keyword e.g.</p> <pre><code>if (foo is bar) { //do something here } </code></pre> <p>but how do you test for it not being "bar"?, I can't seem to find a keyword that works with IS to test for a negative result. </p> <p>BTW - I have a horrible...
<pre><code>if (!(foo is bar)) { } </code></pre>
<p>There is no specific keyword</p> <pre><code>if (!(foo is bar)) ... if (foo.GetType() != bar.GetType()) .. // foo &amp; bar should be on the same level of type hierarchy </code></pre>
7,985
<p>I'd like to be able to write a ruby program that can restart without dropping it's socket connections.</p>
<p>This program gets Google's homepage and then when you pass it SIG_INT via <kbd>Ctrl</kbd>-<kbd>C</kbd> it restarts the program and reads the output of the homepage from the open socket with Google.</p> <pre><code>#!/usr/bin/ruby #simple_connector.rb require 'socket' puts &quot;Started.&quot; if ARGV[0] == &quot;re...
<p>You're talking about network sockets, not UNIX sockets I assume?</p> <p>I'm not sure this suits your needs, but the way I would do it is by seperating the networking and logic part, and only restart the logic part, then reconnect the logic part to the networking part.</p>
5,947
<p>We are developing a middleware SDK, both in C++ and Java to be used as a library/DLL by, for example, game developers, animation software developers, Avatar developers to enhance their products.</p> <p>What I would like to know is this: Are there standard "Best Practices" for the development of these types of API?<...
<p>My two favourite resources on the subject: <a href="http://mollyrocket.com/873" rel="nofollow noreferrer">http://mollyrocket.com/873</a> and <del><a href="http://video.google.com/videoplay?docid=-3733345136856180693" rel="nofollow noreferrer">http://video.google.com/videoplay?docid=-3733345136856180693</a></del></p>...
<p>There are lots of ways to design apis, depending on what you are solving. I think a full answer to this question would be worthy off a whole book, such as the <a href="https://rads.stackoverflow.com/amzn/click/com/0201633612" rel="nofollow noreferrer" rel="nofollow noreferrer">gang of four patterns book</a>. For Jav...
8,779
<p>Are there any tools or plugins to design a Panel independently of a Form (Windows, not Web Form) within Visual Studio?</p> <p>I've been using the designer and manually extracting the bits I want from the source, but surely there is a nicer way.</p>
<p>You could do all the design work inside of a UserControl.</p> <p>If you go that route, instead of just copying the bits out of the user control, simply use the user control itself.</p>
<p>As Chris Karcher said, you should probably use a user control. This will allow easy, VS-supported/-integrated reuse without having to manually fiddle with designer code.</p>
5,759
<p>I am in college and am doing a team competition to print PPSU filament, and get the best results. This is being put on by the Solvay company, who makes the material. Our team signed up and the university bought us an <a href="https://www.intamsys.com/" rel="nofollow noreferrer">Intamsys</a> <a href="https://www.inta...
<p>If you're a brave individual you might try insulating the bottom of your heated bed. You're going to want to get fiberglass or something that can actually withstand the temperatures you're trying to reach; anything past about 230&nbsp;&deg;C and you'll get organic things like cork and cotton starting to smoke. 200&n...
<p>Inspired by the answer from Nach0z, according to my back of the notepad radiative emission approximation, you need about a 3x increase in bed dissipation to get from <span class="math-container">$ \Delta T$</span> of 130 °C up to 170 °C. So that would correspond to an increase from 12 V <em>at the bed</em> to 18 V. ...
1,187
<p>The .NET <code>System.Security.Cryptography</code> namespace has a rather bewildering collection of algorithms that I could use for encryption of credit card details. Which is the best?</p> <p>It clearly needs to be secure for a relatively short string. </p> <p>EDIT: I'm in the UK, where I understand we're OK stor...
<p>No offense, but the question is a little "misguided". There is no "silver bullet" solution. I would recommend to read up on cryptography in general and then do some threat modeling. Some questions (by no means a comprehensive list) you should ask yourself:</p> <ul> <li>Is the module doing the encryption the one whi...
<p>3des is pretty good, store the salt along side, and keep a standard key somewhere not in the database or a config file. That way if you get pwned, they can't decrypt it.</p>
6,252
<p>I have just finished building a Tronxy P802M Prusa i3.</p> <p>When I try to move the Z-axis, using the hardware buttons in the LCD menu (without a computer connected), it only goes down, when I both increase, and decrease, the value of Z.</p> <p>Any suggestions?</p>
<p>It could be a hardware fault. </p> <p>First check, and compare, the control board connections to the motors of the three axes. You don't state it in your question but, presumably, the X and Y axes move correctly? If so, then compare the connections for the Z-axis motors with the connections for the motors of the ax...
<p>It could be a hardware fault. </p> <p>First check, and compare, the control board connections to the motors of the three axes. You don't state it in your question but, presumably, the X and Y axes move correctly? If so, then compare the connections for the Z-axis motors with the connections for the motors of the ax...
611
<p>I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.</p> <p>On OSX, I can open a window in the finder with</p> <pre><code>os.system('open "%s"' % foldername) </code></pre> <p>and on Windows with</p> <pre><code>os.startfile(foldernam...
<pre><code>os.system('xdg-open "%s"' % foldername) </code></pre> <p><code>xdg-open</code> can be used for files/urls also</p>
<p>this would probably have to be done manually, or have as a config item since there are many file managers that users may want to use. Providing a way for command options as well.</p> <p>There might be an function that launches the defaults for kde or gnome in their respective toolkits but I haven't had reason to lo...
6,338
<p>I'm looking for a book/site/tutorial on best practices for relational database design, tuning for performance etc. It turns out this kind of resource is a bit difficult to find; there's a lot of "here's normalization, here's ER diagrams, have at it," but not much in the way of real examples. Anyone have any ideas?</...
<p>Book: <a href="https://rads.stackoverflow.com/amzn/click/com/0201752840" rel="noreferrer" rel="nofollow noreferrer">Database Design for Mere Mortals</a></p>
<p>Here are some resources I could find on the web. They include examples you are looking for:</p> <ul> <li><a href="http://databases.ncl.ac.uk/databases/Design/default.aspx" rel="nofollow noreferrer">Designing and creating a Relational Database - Dr Lorna Scammell: Newcastle University Database Adviser</a></li> <li><...
3,270
<p>I love list comprehensions in Python, because they concisely represent a transformation of a list.</p> <p>However, in other languages, I frequently find myself writing something along the lines of:</p> <pre><code>foreach (int x in intArray) if (x &gt; 3) //generic condition on x x++ //do other processin...
<p>The increment in the original <code>foreach</code> loop will not affect the contents of the array, the only way to do this remains a <code>for</code> loop:</p> <pre><code>for(int i = 0; i &lt; intArray.Length; ++i) { if(intArray[i] &gt; 3) ++intArray[i]; } </code></pre> <p>Linq is not intended to modify existi...
<p>Depends on the language and what you need to do, a "map" as it's called in many languages could be what you're looking for. I don't know C#, but according to <a href="http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx" rel="nofollow noreferrer">this</a> page, .NET 2.0 calls map "ConvertAll".</p> <p>The mea...
3,433
<p>Database? Page variables? Enum?</p> <p>I'm looking for opinions here. </p>
<p>The ASP.NET Sitemap feature is built for that and works well in a lot of cases. If you get in a spot where you want your <a href="http://weblogs.asp.net/jgalloway/archive/2008/01/26/asp-net-menu-and-sitemap-security-trimming-plus-a-trick-for-when-your-menu-and-security-don-t-match-up.aspx" rel="nofollow noreferrer">...
<p>IF the menu is dynamic <em>per-user</em> then you'll have to hit the database for each user. From then on I would probably store it in session to avoid future round-trips to the database.</p> <p>If it's dynamic, but the entire site sees the same items, then put it in the database and cache the results</p>
7,772
<p>I need a Datepicker for a WPF application. What is considered to be the best one? </p>
<h3>There is also the <a href="http://www.codeplex.com/wpf" rel="noreferrer">WPF Tool Kit</a> which has a DatePicker/Calendar control</h3> <p>(i added emphasis because this is the answer)</p>
<p>I'm thinking of using this one: <a href="http://marlongrech.wordpress.com/2007/09/11/wpf-datepicker/" rel="nofollow noreferrer">Marlon Grech Date Picker</a>.</p>
7,309
<p>My code needs to determine how long a particular process has been running. But it continues to fail with an access denied error message on the <code>Process.StartTime</code> request. This is a process running with a User's credentials (ie, not a high-privilege process). There's clearly a security setting or a policy...
<p>I've read something similar to what you said in the past, Lars. Unfortunately, I'm somewhat restricted with what I can do with the machine in question (in other words, I can't go creating user groups willy-nilly: it's a server, not just some random PC).</p> <p>Thanks for the answers, Will and Lars. Unfortunately, t...
<p>OK, sorry that didn't work... I am no expert on ASP.NET impersonation, I tend to use app pools which I don't think you can do on W2K Have you tried writing a tiny little test app which does the same query, and then running that as various users? </p> <p>I am reluctant to post a chunk of MS framework code here,...
4,831
<p>I'm trying to create a webapplication where I want to be able to plug-in separate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.</p> <p>If I want to use a view, I'...
<p>Essentially this is the same issue as people had with WebForms and trying to compile their UserControl ASCX files into a DLL. I found this <a href="http://www.codeproject.com/KB/aspnet/ASP2UserControlLibrary.aspx" rel="noreferrer">http://www.codeproject.com/KB/aspnet/ASP2UserControlLibrary.aspx</a> that might work f...
<p>An addition to all you who are still looking for the holy grail: I've come a bit closer to finding it, if you're not too attached to the webforms viewengine.</p> <p>I've recently tried out the Spark viewengine. Other than being totally awesome and I wouldn't go back to webforms even if I was threathened, it also pr...
4,013
<p>Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this?</p> <pre><code>TExample = record SortOrder : integer; SomethingElse : string; end; var SomeVar : array of TExample; </code></pre>
<p>You can add pointers to the elements of the array to a <code>TList</code>, then call <code>TList.Sort</code> with a comparison function, and finally create a new array and copy the values out of the TList in the desired order.</p> <p>However, if you're using the next version, D2009, there is a new collections libra...
<p>I created a very simple example that works correctly if the sort field is a string.</p> <pre><code>Type THuman = Class Public Name: String; Age: Byte; Constructor Create(Name: String; Age: Integer); End; Constructor THuman.Create(Name: String; Age: Integer); Begin Self.Name:= Name; Self.Age:=...
6,313
<p>When making a cylinder, sometimes I need to only take a pie slice. I'm currently using <a href="http://forum.openscad.org/Creating-pie-pizza-slice-shape-need-a-dynamic-length-array-tp3148p3149.html" rel="noreferrer">this</a> neat trick to make pie slices for angles under 90 degrees. However, I have need of a few ang...
<p>This is what I use:</p> <pre><code>module pieSlice(a, r, h){ // a:angle, r:radius, h:height rotate_extrude(angle=a) square([r,h]); } pieSlice(110,20,3); </code></pre>
<p>Although generating complex shapes by combining primitive OpenSCAD shapes is a well-established tradition, and is often all that is needed, it would be more elegant in this case to generate a pie slice directly using the <code>polygon</code> function and a list comprehension.</p> <pre><code>module pie_slice(r=3.0, ...
1,419
<p>I have developed a simple page using JQuery. It works fine in almost all browsers (i.e. Firefox, IE, Chrome) but whenever the page is opened in IE, it prompts Javascript error like,</p> <pre><code>'guid' is null or not an object on line 1834 </code></pre> <p>Do you have any idea ?</p>
<p>Thanks guys for your messages.</p> <p>The error was on my part. For hover event, I was not passing function for "out". Therefore the handler was passed as undefined in jQuery.event function and that causing error for statement ,</p> <p>if ( !handler.guid )</p> <p>written at 1834 line of jquery-1.2.6.js file.</p> ...
<p>Maybe you're using the parentNode or parentElement property? There are some issues with that in IE vs other browsers.</p>
9,656
<p>I have just built my Anet A8 and it won't print. </p> <p>I will preheat it (190°C 60°C) and then press "<code>Print File</code>" and select, then it starts for a second, gets to around 11% and stops and shows "<code>Preheat PLA</code>". The PLA is already preheated - it is coming out of the nozzle. </p> <p>Any hel...
<p>I had a similar problem last week where the thermostat's heat shrink was being melted by the block and the two wires were touching. I fixed this by securing the thermistor and putting a thermal insulator between the block and the wires. I also put a small piece of heat shrink between the wires to insulate them so th...
<p>The Anet A8 files that come preloaded are <code>.stl</code> so if you try to print those it will say printing zero percent and then just switch right back to preheating PLA without any error message. Download a free slicer tool if that's the case.</p>
580
<p>Recently, I started changing some of our applications to support <code>MS SQL Server</code> as an alternative back end. </p> <p>One of the compatibility issues I ran into is the use of MySQL's CREATE TEMPORARY TABLE to create in-memory tables that hold data for very fast access during a session with no need for per...
<p>@Keith</p> <p>This is a common misconception: Table variables are NOT necessarily stored in memory. In fact SQL Server decides whether to keep the variable in memory or to spill it to TempDB. There is no reliable way (at least in SQL Server 2005) to ensure that table data is kept in memory. For more detailed info l...
<p>CREATE TABLE #tmptablename</p> <p>Use the hash/pound sign prefix</p>
4,749
<p>I've been making some ABS prints, but it's really hard to remove it afterwards. I've read a lot of different ways of removing it, including using the included chisel/spatula, using air duster, 50/50 alcohol/water, reheating the bed...</p> <p>I've also read about using a flexible bed that can flex it out. I'm eager ...
<p>No, you did not set all the settings to the same speed, there are 2 different print speeds defined:</p> <ul> <li>Infill Solid: <strong>60</strong> mm/s</li> <li>First Layer Speed: <strong>30%</strong></li> </ul> <p>This means, that some walls will be printed 10 mm/s faster than the others, and that <em>first layer...
<p>Make sure that on the Print Settings tab, under Advanced, you have set the Extrusion widths for your custom nozzle settings.</p>
1,118
<p>I am using Firefox 3 to debug my ASP.NET applications in Visual Studio 2008. How can I configure either FF3 or VS2008 so that when I 'x' out of Firefox I don't have to hit the stop debugging button in Visual Studio? (The behavior you get with IE)</p>
<p>My solution to this has been to manually attach the debugger to the relevant browser and the aspnet_wp process. When I'm finished, I simply detach all.</p>
<p>I have the same thing. I assume you're working with Cassini (the integrated web server).</p> <p>I've yet to find an answer to that (I just go back to VS and press <em>Shift+F5</em> to stop the debugger), but I can tell you that if you check the <em>"Edit and Continue"</em> box in the project's properties (web tab),...
8,447
<p>When I build my <a href="http://en.wikipedia.org/wiki/ASP.NET" rel="nofollow noreferrer">ASP.NET</a> web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How c...
<p>One solution appears to be Web Deployment Projects (WDPs), an add-on for Visual Studio (and msbuild) available that builds a web project to a directory and can optionally merge assemblies and alter the web.config file. The output of building a WDP is all the files necessary to deploy the site in one directory.</p> ...
<p>Have you tried right clicking the website in Solution Explorer and clicking 'Publish Website'?</p>
7,905
<p>Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so. </p> <p>Now I want to get rid of sourcesafe and move on to Team Foundation Server.</p> <p>Do you have any tips or tricks for me before I embark on this migration? What are the things I have to be careful abou...
<p>There are a few different ways you can migrate. The tool will pull your history, etc. over, but the more pragmatic and simple way is to lock VSS as a history archive and start fresh:</p> <ol> <li>Have everyone check in all changes into VSS, make sure everything builds, etc.</li> <li>Set all VSS databases to "locke...
<p>Good guidance there from my former colleage Guy Starbuck. Another thing to add with that approach - you may have decided over time that you want to refactor the way your application is organized (folders etc) and this will give you an oppurtunity to do so.</p> <p>I've been in situations where we organized a soluti...
4,964
<p>In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content. </p> <p>This basically means that I have to make sure that the dropbox is wide enough to display the longest selection possible. This makes my page lo...
<p>Here's another <a href="http://jquery.com" rel="noreferrer">jQuery</a> based example. In contrary to all the other answers posted here, it takes all keyboard and mouse events into account, especially clicks:</p> <pre><code>if (!$.support.leadingWhitespace) { // if IE6/7/8 $('select.wide') .bind('focus m...
<p>You can add a style directly to the select element:</p> <p><code>&lt;select name="foo" style="width: 200px"&gt;</code></p> <p>So this select item will be 200 pixels wide.</p> <p>Alternatively you can apply a class or id to the element and reference it in a stylesheet</p>
9,968
<p>I'm a beginner in 3d printing, so please bear with me.</p> <p>I downloaded a zip with about 100 STL files. I now want to pick one or two to print. The names of the stl files are not very helpful so I need to look at them to find the ones I want. I can open all of them one by one using Cura, or Tinkercad, but that is...
<p>Using the search terms, &quot;linux stl viewer,&quot; a number of results appear. One of the more promising programs, for Mac, Windows and Linux appears to be <a href="https://github.com/fstl-app/fstl" rel="noreferrer">fast stl viewer</a>, aka fstl. Image from linked site. Instructions included on the linked site to...
<p>Cura's probably your best bet. You can select several STL files and it will open them all, (memory allowing) then try to place them for printing. If they can't fit on your print bed the items get placed off to the side. Clicking on the object will show its name in the lower-left, so you can go rename the file to ...
2,175
<p>Are there any programs or IDEs that support refactoring for Ruby or RoR?</p>
<p>The best refactoring tool is good test coverage. If your tests cover your code and they all past you can just make whatever changes you want and the tests will find any dependencies you have broken. This is the main reason why IDE-based refactoring tools are less prevalent in Ruby than elsewhere.</p>
<p>There's also <a href="http://www.codegear.com/products/3rdrail" rel="nofollow noreferrer">3rdRail</a> from CodeGear (from Delphi fame). The only catch is that it's not free.</p>
9,848
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html">Why not use tables for layout in HTML?</a> </p> </blockquote> <p>Under what conditions should you choose tables instead of DIVs in HTML coding?</p>
<p>The whole "Tables vs Divs" thing just barely misses the mark. It's not "table" or "div". It's about using semantic html.</p> <p>Even the div tag plays only a small part in a well laid out page. Don't overuse it. You shouldn't need that many if you put your html together correctly. Things like lists, field sets...
<blockquote> <p>One other use I would have for it would be forms, particularly label : textbox pairs. This could technically be done in div boxes, but it's much, much easier to do this in tables, and one can argue that label:textbox pairs are in fact tabular in nature.</p> </blockquote> <p>I see that a ...
5,013
<p>I'm interested in 3d printed reaction chambers, but can't find any good information on chemical resistances of PLA, just vague claims that it "might not be" "because it's biodegradable" or that it depends on additives (likely true, but it would be nice to know if there's hope of finding PLA without problematic addit...
<p>The paper <a href="https://www.researchgate.net/publication/326697946_Chemical_Compatibility_of_Fused_Filament_Fabrication-based_3-D_Printed_Components_with_Solutions_Commonly_Used_in_Semiconductor_Wet_Processing" rel="nofollow noreferrer">Chemical Compatibility of Fused Filament Fabrication-based 3-D Printed Compon...
<p>As @T. M. notes in his comment, there are many good charts of chemical compatibility with various agents. Very few (I found none) include information about PLA. By all means, use search engines to find some information.</p> <p>But, no data source is as true to your specific needs as is testing your candidate mate...
1,273
<p>I need to pass a UUID instance via http request parameter. Spring needs a custom type converter (from String) to be registered. How do I register one?</p>
<p>Please see chapter 5 of the spring reference manual here: <a href="http://static.springframework.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion-customeditor-registration" rel="nofollow noreferrer">5.4.2.1. Registering additional custom PropertyEditors</a></p>
<p>Not sure what you are asking?</p> <p>Spring comes with a <a href="http://static.springframework.org/spring/docs/2.5.5/api/org/springframework/beans/factory/config/CustomEditorConfigurer.html" rel="nofollow noreferrer">CustomEditorConfigurer</a> to supply custom String &lt;-> Object converters.</p> <p>To use this, ...
9,350
<p>I have a very large code base that contains extensive unit tests (using CppUnit). <b>I need to work out what percentage of the code is exercised by these tests</b>, and (ideally) generate some sort of report that tells me on a per-library or per-file basis, how much of the code was exercised.</p> <p>Here's the kick...
<h3>Which tool should I use?</h3> <p>This <a href="http://web.archive.org/web/20090527141110/http://www.kimbly.com/blog/000331.html" rel="noreferrer">article describes</a> another developers frustrations searching for C++ code coverage tools. The author's final solution was <a href="http://www.bullseye.com/" rel="nore...
<p>I guess I should have specified the compiler - we're using gcc for Linux, and MSVC 6 (yeah I know, it's old, but it works (mostly) for us) for WIn32.</p> <p>For that reasons, gcov won't work for our Win32 builds, and Bullseye won't work for our Linux builds.</p> <p>Then again maybe I only need coverage in one OS.....
5,300
<p>Yacc does not permit objects to be passed around. Because the %union can only contain POD types, complex objects must be new'd and passed around by pointer. If a syntax error occurs, the yacc parser just stops running, and references to all of those created objects are lost.</p> <p>The only solution I've come up wi...
<p>I love Yacc, but the discriminating union stack does present a challenge.</p> <p>I don't know whether you are using C or C++. I've modified Yacc to generate C++ for my own purposes, but this solution can be adapted to C.</p> <p>My preferred solution is to pass an interface to the owner down the parse tree, rather ...
<p>Use <a href="http://www.boost.org/doc/libs/1_36_0/libs/smart_ptr/smart_ptr.htm" rel="nofollow noreferrer">smart pointers</a>!</p> <p>Or, if you're uncomfortable depending on yet another library, you can always use <a href="http://www.gotw.ca/publications/using_auto_ptr_effectively.htm" rel="nofollow noreferrer">aut...
9,063
<p>Currently, 3D Builder is telling me "one or more objects are invalidly defined. Click here to repair." What is this and what does it mean? When I click it, it totally messes up my model (I can't tell what it even did due to the orthogonal camera). Model stats: </p> <ul> <li>Made with Sketchup</li> <li>Used STL Expo...
<p>Those wavy lines could be artefacts caused by closely-spaced infill, but they could also be resonance patterns caused by noisy stepper motors and over-tight belts. Since you have said that you have your belts nice and tight, I would suggest reducing the tension on them and see what happens. I know that some pundits ...
<p>It is difficult to see with the lighting and the shiny green, but try printing a more complex object, like the usual <a href="https://www.thingiverse.com/thing:1278865" rel="nofollow noreferrer">XYZ cube</a>. Does it look like this one? which means big waves after a change of direction, but then getting smaller?</p>...
705
<p>I am using the Photoshop's javascript API to find the fonts in a given PSD.</p> <p>Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc.</p> <p>This is all happening in a python program running on OSX so I guess I'm looking for one of:</p> <...
<p>Unfortunately the only API that isn't deprecated is located in the ApplicationServices framework, which doesn't have a bridge support file, and thus isn't available in the bridge. If you're wanting to use ctypes, you can use ATSFontGetFileReference after looking up the ATSFontRef.</p> <p>Cocoa doesn't have any nati...
<p>open up a terminal (Applications->Utilities->Terminal) and type this in:</p> <pre><code>locate InsertFontHere </code></pre> <p>This will spit out every file that has the name you want.</p> <p>Warning: there may be alot to wade through.</p>
2,291
<p>One of the sites I maintain relies heavily on the use of <code>ViewState</code> (it isn't my code). However, on certain pages where the <code>ViewState</code> is extra-bloated, Safari throws a <code>"Validation of viewstate MAC failed"</code> error.</p> <p>This appears to only happen in Safari. Firefox, IE and Oper...
<p>I've been doing a little research into this and whilst I'm not entirely sure its the cause I believe it is because Safari is not returning the full result set (hence cropping it).</p> <p>I have been in dicussion with another developer and found the following post on Channel 9 as well which recommends making use of ...
<p>My first port of call would be to go through the elements on the page and see which controls:</p> <ol> <li>Will still work when I switch ViewState off</li> <li>Can be moved out of the page and into an AJAX call to be loaded when required</li> </ol> <p>Failing that, and here's the disclaimer - I've never used this ...
2,361
<p>I have an <code>ArrayList&lt;String&gt;</code> that I'd like to return a copy of. <code>ArrayList</code> has a clone method which has the following signature:</p> <pre><code>public Object clone() </code></pre> <p>After I call this method, how do I cast the returned Object back to <code>ArrayList&lt;String&gt;</co...
<p>Why would you want to clone? Creating a new list usually makes more sense.</p> <pre><code>List&lt;String&gt; strs; ... List&lt;String&gt; newStrs = new ArrayList&lt;&gt;(strs); </code></pre> <p>Job done.</p>
<pre><code>ArrayList first = new ArrayList (); ArrayList copy = (ArrayList) first.clone (); </code></pre>
7,857
<p>Does anyone know how to transform a enum value to a human readable value?</p> <p>For example:</p> <blockquote> <p>ThisIsValueA should be "This is Value A".</p> </blockquote>
<p>Converting this from a vb code snippet that a certain Ian Horwill left at a <a href="http://secretgeek.net/progr_purga.asp" rel="noreferrer">blog post long ago</a>... i've since used this in production successfully.</p> <pre><code> /// &lt;summary&gt; /// Add spaces to separate the capitalized words in the s...
<p>I found it best to define your enum values with an under score so ThisIsValueA would be This_Is_Value_A then you can just do a enumValue.toString().Replace("_"," ") where enumValue is your varible.</p>
3,455
<p>I am looking for a simple JavaScript example that updates DOM.<br> Any suggestions?</p>
<p>Here is a short pure-javascript example. Assume you have a div with the id "maincontent".</p> <pre><code>var newnode = document.createTextNode('Here is some text.'); document.getElementById('maincontent').appendChild(newnode); </code></pre> <p>Of course, things are a lot easier (especially when you want to do more...
<p>I believe that this tutorial on jQuery has an example that might help you: <a href="http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery" rel="nofollow noreferrer">http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery</a></p>
6,589
<p>I have a <code>XmlDocument</code> in java, created with the <code>Weblogic XmlDocument</code> parser.</p> <p>I want to replace the content of a tag in this <code>XMLDocument</code> with my own data, or insert the tag if it isn't there.</p> <pre><code>&lt;customdata&gt; &lt;tag1 /&gt; &lt;tag2&gt;mfkdslmlfkm&...
<p>How about an XPath based approach? I like this approach as the logic is super-easy to understand. The code is pretty much self-documenting.</p> <p>If your xml document is available to you as an org.w3c.dom.Document object (as most parsers return), then you could do something like the following:</p> <pre><code>// g...
<p>You should be able to do this with <code>query</code></p> <p>try </p> <pre><code> fn:replace(string,pattern,replace) </code></pre> <p>I am new to xquery myself and I have found it to be a painful query language to work with, but it does work quiet well once you get over the initial learning curve. </p> <p>I do s...
3,670
<p>Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying. </p> <p>Steps to reproduce: Open Terminal.app, reverse-search to a longish command. Hit &lt;ctrl&...
<p>I was able to set my TERM to xterm instead of xterm-color and it solves the problem. (export TERM=xterm).</p>
<p>In worst case, you could launch the X server (somewhere under utilities) and launch a real xterm. </p>
5,612
<p>What's are the best practices for versioning web sites?</p> <ul> <li>Which revision control systems are well suited for such a job?</li> <li>What special-purpose tools exist?</li> <li>What other questions should I be asking?</li> </ul>
<p>Firstly you can - and should - use a revision control system, most will handle binary files although unlike text files you can't merge two different set of changes so you may want to set the system up to lock these files whilst they are being changed (assuming that that's not the default mode of operation for you rc...
<p>I use <a href="http://svnbook.red-bean.com/" rel="nofollow noreferrer">Subversion</a>. As an easy way to reference the website version (production, testing, development), I use a very simple trick. I add the revision number somewhere on the site (eg in the admin footer). Something like this:</p> <pre><code>&lt;?php...
5,781
<p>I was wondering if anyone could suggest a utility library that has useful functions for handling dates in ASP.NET easily taking away some of the leg work you normally have to do when handling dates?</p> <p>Subsonic Sugar has some really nice functions:</p> <p><a href="http://subsonichelp.com/html/1413bafa-b5aa-99a...
<p>Is there a specific problem you are trying to handle with dates? If the existing date API in .NET can handle your problem cleanly, I see no reason to consider a 3rd party library to do it. When I was in .NET, we had to deal with dates quite a bit, and the standard libraries provided a fair amount of functionality ...
<p>What exactly do you want to do that System.DateTime and System.Timespan can't handle?</p>
8,687
<p>I would like to be able to add a "message" to a unit test, such that it actually appears within the TestResult.xml file generated by NUnit. For example, this is currently generated:</p> <pre><code>&lt;results&gt; &lt;test-case name="MyNamespace.Tests.MyTest" executed="True" success="True" time="0.203" asserts=...
<p>This may be missing the point, but how about naming the tests so they indicate what they test - then you may not even need the message. </p> <p>If it proves to be absolutely necessary, I think you'll need to produce your own testrunner that would (off the top of my head) read an additional attribute off the TestCas...
<p>I can't see anything available at run time, but there are a couple of features that you might want to investigate: the <a href="http://www.nunit.org/index.php?p=description&amp;r=2.4.8" rel="nofollow noreferrer">Description</a> attribute and the <a href="http://www.nunit.org/index.php?p=property&amp;r=2.4.8" rel="no...
6,638
<p>Is there a difference between 3D printing and additive manufacturing if any then explain?</p>
<p>Yes and No at the same time:</p> <h1>3D Printing is a subset of Additive Manufacturing</h1> <h3>but treated as a synonym at this time</h3> <p>3D printing is a process that takes some material, in a fluid state that fuses with the model to shape an object from it. The material could be plastics, ceramic paste or even...
<h3>Origin</h3> <p>3D printing and additive manufacturing (AM) both refer to a <a href="https://en.wikipedia.org/wiki/3D_printing_processes" rel="nofollow noreferrer">range of processes</a> where, opposed to subtractive manufacturing methodologies, materials are joined to create products. E.g. <a href="https://en.wikip...
1,095
<p>I could only find the function <code>confirm()</code> that gives OK/Cancel buttons. Is there any way to give Yes/No buttons?</p>
<p>Javascript offers 3 modal boxes. <code>prompt</code>, <code>confirm</code> and <code>alert</code>. None of those satisfy your request. </p> <p>There are a plethora of js modal popup solutions. Here's an example.</p> <ul> <li><a href="https://github.com/okonet/modalbox" rel="nofollow noreferrer">ModalBox</a></l...
<p>Use dialog box to display yes or no</p> <pre><code> &lt;div id="dialog_box" class="mnk-modal-bg" style="display:none"&gt; &lt;div id="dbg" class="mnk-modal-box"&gt; &lt;i class="uk-icon-exclamation-triangle" style="color:#757575; padding-right:5px;"&gt; &lt;/...
3,971
<p>It's getting close to the time when I need to submit training and travel requests. I'm looking for conferences and classes in the coming 12 months that are geared toward improving coding and software development, best practices, system architecture, etc. They need to be in the US or Canada since I'll never get appro...
<p>If you are using Microsoft technologies, the <a href="http://www.pnpsummit.com/" rel="nofollow noreferrer">patterns &amp; practices Summit</a> is a good event -- if you are not working pretty much 100% in the Microsoft .NET space, though, it would be of less use.</p>
<p><a href="http://infoq.com/" rel="nofollow noreferrer">InfoQ</a>'s conferences seem to be valuable. Some parts of their materials is available online.</p>
7,842
<p>I've been asked to prepare a 3D model for 3D printing in sandstone. I've been told that it needs to be 3" tall and the walls have to be at least 2&nbsp;mm thick. It's an absolute pain in the neck having to make sure everything is the right thickness. So, I was wondering, can the whole model just be printed as a soli...
<p>Yes, you can just print it solid. However, it might be significantly more expensive to print your object entirely solid. For instance, Shapeways charges \$0.75 per cm³ of material for their full-color sandstone. A solid cube of 5x5x5 cm would cost \$96 to print, whereas it would only cost around \$6 if you printed i...
<p>To add to the selected answer, again, yes you can, however making all of the walls AT LEAST 2mm thick shouldn't be too hard, depending on your model and modelling app.</p> <p>If your modelling app doesn't have a good shell function (or if it's too finicky on your model) you could easily define SOME negative space w...
249
<p>I have a C++ app that needs to connect to a JAVA web app, are there any good, open source SOAP packages for this, or would it be easier to just roll my own?</p>
<p>I'll vote up darkhelmet since <a href="http://www.cs.fsu.edu/~engelen/soap.html" rel="noreferrer">gSoap</a> would also be my recommendation. We're mostly a Java shop but with some C++ bits and gSoap has been our preferred SOAP integration way. It is indeed more work than your typical Java stacks but it seems solid.<...
<p>Take a look at Apache's <a href="http://ws.apache.org/axis/index.html" rel="nofollow noreferrer">Axis</a> project. It's well supported on C++ (and Java) and if you have the good fortune to start with a good WSDL for the target service you'll be home-free.</p>
6,689
<p>I want to build an ASP.NET MVC application with Boo instead of C#. If you know the steps to configure this type of project setup, I'd be interested to know what I need to do. </p> <p>The MVC project setup is no problem. What I'm trying to figure out how to configure the pages and project to switch to use the Boo la...
<p>So there are two levels of "work with Boo". One would be all the code (namely, the Controllers), and the other would be the views.</p> <p>For the code, I assume Boo compiles to standard .NET assemblies, so simply properly following the naming conventions using by ASP.NET MVC should allow you to write Controllers. Y...
<p>The Brail view engine has been implemented to be used in ASP.NET MVC. The <a href="http://www.mvccontrib.org" rel="nofollow noreferrer">MvcContrib</a> project implemented the code. The <a href="http://code.google.com/p/mvccontrib/" rel="nofollow noreferrer">source code</a> is located on Google Code.</p> <p>As far...
5,060
<p>I read that G-code commands can be sent through a console/terminal over USB. What is a console/terminal and how do you use that?</p>
<p>There are several programs that could serve as a console to connect to a printer, put let's start somewhere: the USB connection.</p> <h1>Step 1: Connection with USB</h1> <p>When connecting the printer via USB for the first time, we will get a notification that some unknown item is connected. If we use windows we can...
<p>In addition to <a href="https://3dprinting.stackexchange.com/a/10574/5740">this answer</a>, the OctoPrint 3D print server software contains a terminal which you can use to send G-code commands from a browser:</p> <h2>OctoPrint</h2> <p>In the bottom string input box (under the check mark items) you put in a G-code ...
1,407
<p>I've got a table of URLs and I don't want any duplicate URLs. How do I check to see if a given URL is already in the table using PHP/MySQL?</p>
<p>If you don't want to have duplicates you can do following:</p> <ul> <li>add uniqueness constraint</li> <li>use "<a href="http://dev.mysql.com/doc/refman/5.0/en/replace.html" rel="noreferrer">REPLACE</a>" or "<a href="http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html" rel="noreferrer">INSERT ... ON DUP...
<p>You could do this query:</p> <pre><code>SELECT url FROM urls WHERE url = 'http://asdf.com' LIMIT 1 </code></pre> <p>Then check if <a href="http://php.net/mysql_num_rows" rel="nofollow noreferrer">mysql_num_rows()</a> == 1 to see if it exists.</p>
8,613
<p>What is the best way to support multiple languages for the interface in an ASP.NET MVC application? I've seen people use resource files for other applications. Is this still the best way?</p>
<p>If you're using the default view engines, then local resources work in the views. However, if you need to grab resource strings within a controller action, you can't get local resources, and have to use global resources.</p> <p>This makes sense when you think about it because local resources are local to an aspx pa...
<p>This is another option, and you'll have access to the CurrentUICulture in the controller: </p> <p>Check <a href="http://subvert.ca/Blog/MVC3-multi-language" rel="nofollow">MVC3-multi-language</a></p>
2,604
<p>Is it possible to detect when the user clicks on the browser's back button?</p> <p>I have an Ajax application and if I can detect when the user clicks on the back button I can display the appropriate data back</p> <p>Any solution using PHP, JavaScript is preferable. Hell a solution in any language is fine, just need...
<p>There are multiple ways of doing it, though some will only work in certain browsers. One that I know off the top of my head is to embed a tiny near-invisible iframe on the page. When the user hits the back button the iframe is navigated back which you can detect and then update your page. <a href="http://www.ajax...
<p>The dojo toolkit has functionality to deal with this in javascript. I don't think there is any good way to handle it in pure PHP.</p> <p>Here is the docs page they have: <a href="http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/back-button-undo" rel="nofollow noreferrer">http://dojotoolk...
7,973
<p>I have a Singleton/Factory object that I'd like to write a JUnit test for. The Factory method decides which implementing class to instantiate based upon a classname in a properties file on the classpath. If no properties file is found, or the properties file does not contain the classname key, then the class will in...
<p>This question might be old but since this was the nearest answer I found when I had this problem I though I'd describe my solution.</p> <p><strong>Using JUnit 4</strong></p> <p>Split your tests up so that there is one test method per class (this solution only changes classloaders between classes, not between metho...
<p>Below you can find a sample that does not need a separate JUnit test runner and works also with classloading tricks such as Mockito.</p> <pre><code>package com.mycompany.app; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import java....
6,348
<p>I'm printing a lot of draft parts so I don't care if they fall apart in my fingers, I just need the shape. I can scroll to the Tune menu on my Ender 3 Pro console and set the speed to 200% and it doubles the speed. But when I set the Print Speed setting to 100 instead of 50 mm/s in Cura, it doesn't save much time, e...
<p>If you use a build surface such as PEI, acetone frosts your surface, leaving a white film appearance. If you have no additional surface on a glass or metal bed, it is incomplete cleaning. If incomplete cleaning, you could try isopropyl alcohol (IPA) immediately after acetone, followed immediately by a water based ...
<p>If you use a build surface such as PEI, acetone frosts your surface, leaving a white film appearance. If you have no additional surface on a glass or metal bed, it is incomplete cleaning. If incomplete cleaning, you could try isopropyl alcohol (IPA) immediately after acetone, followed immediately by a water based ...
1,872
<p>Is there a performance difference between <code>i++</code> and <code>++i</code> if the resulting value is not used?</p>
<p>Executive summary: No.</p> <p><code>i++</code> could potentially be slower than <code>++i</code>, since the old value of <code>i</code> might need to be saved for later use, but in practice all modern compilers will optimize this away.</p> <p>We can demonstrate this by looking at the code for this function, both ...
<p>My C is a little rusty, so I apologize in advance. Speedwise, I can understand the results. But, I am confused as to how both files came out to the same MD5 hash. Maybe a for loop runs the same, but wouldn't the following 2 lines of code generate different assembly?</p> <pre><code>myArray[i++] = "hello"; </code>...
4,452
<p>I know that we shouldn't being using the registry to store Application Data anymore, but in updating a Legacy application (and wanting to do the fewest changes), what Registry Hives are non-administrators allowed to use? </p> <p>Can I access all of <code>HKEY_CURRENT_USER</code> (the application currently access <...
<p>In general, a non-administrator user has this access to the registry:</p> <p>Read/Write to:</p> <ul> <li><code>HKEY_CURRENT_USER</code></li> </ul> <p>Read Only:</p> <ul> <li><code>HKEY_LOCAL_MACHINE</code></li> <li><code>HKEY_CLASSES_ROOT</code> (which is just a <em>link</em> to <code>HKEY_LOCAL_MACHINE\Software...
<p>Yes, you should be able to write to any place under HKEY_CURRENT_USER without having Administrator privileges. But this is effectively a private store that no other user on this machine will be able to access, so you can't put any shared configuration there.</p>
7,656
<p>The original bed surface of my Ender 3 has become brittle and finally cracked, requiring replacement. I'm trying to figure out what the cause might have been to avoid it happening again. It seems to have started after using "flex PLA", which involves both high temperatures (225&nbsp;&deg;C) and plasticizers mixed in...
<p>The build surface on the Ender3 is a BuildTak clone. The picture is a bit unclear, but given my experience with BuildTak (clones) this certainly damage because of heat. You can, as suggested before, replace the bed surface, but I do not think it is necessary at this stage. </p> <p>Normally these surfaces do not get...
<p>The material used for the Build surface is not PEI but a BuildTak Clone that offers adhesion through a rough surface texture. I do not know what exactly is in the composition of the polymer, but I can say that my bed surface needed replacement about 9 months after purchase after I vigorously removed a piece I printe...
1,295
<p>Is it possible to remote-debug a Visual C++ 6.0 application running on a Windows NT machine from a developer workstation running Windows XP? If so, is there a procedure written up somewhere?</p>
<p>Take a look at <a href="http://www.codeproject.com/KB/debug/remotedebug.aspx" rel="nofollow noreferrer">this article.</a> Also <a href="http://msdn.microsoft.com/en-us/library/bt727f1t.aspx" rel="nofollow noreferrer">this</a> may be helpful although you don't mention which version of the IDE you're using. </p>
<p>Yes -- you can also use a newer version of Visual Studio. As long as you have the PDB file for the target application it doesn't matter what version it was built with (well, VS6 might not understand a newer PDB, but backwards should be fine).</p> <p>The remote debugging experience on newer VS versions is a lot smo...
6,812
<p>I am running an Ender 3 pro with an Octoprint connected. I accidentally set the print speed too slow in Cura and the print will take very long. Is there a Marlin command I can issue to the printer to speed it up without stopping the print?</p>
<h1>yes</h1> <p>Print speed is a setting that can be altered by just turning the click-wheel of the Ender 3. You don't need to push it to gain access to menus. A turn to the right does increase the speed, left lowers it. It is applied only some moments after stopping the turning - then the firmware does inject a <code>...
<h1>yes</h1> <p>Print speed is a setting that can be altered by just turning the click-wheel of the Ender 3. You don't need to push it to gain access to menus. A turn to the right does increase the speed, left lowers it. It is applied only some moments after stopping the turning - then the firmware does inject a <code>...
1,769
<p>Does anyone know of a good method for editing PDFs in PHP? Preferably open-source/zero-license cost methods. :)</p> <p>I am thinking along the lines of opening a PDF file, replacing text in the PDF and then writing out the modified version of the PDF?</p> <p>On the front-end</p>
<p>If you are taking a 'fill in the blank' approach, you can precisely position text anywhere you want on the page. So it's relatively easy (if not a bit tedious) to add the missing text to the document. For example with Zend Framework:</p> <pre><code>&lt;?php require_once 'Zend/Pdf.php'; $pdf = Zend_Pdf::load('blank...
<p>We use <a href="http://www.pdflib.com/pdflib-gmbh/" rel="nofollow noreferrer">pdflib</a> to create PDF files from our rails apps. It has bindings for PHP, and a ton of other languages.</p> <p>We use the commmercial version, but they also have a <a href="http://www.pdflib.com/download/pdflib-family/pdflib-lite/" rel=...
2,896
<p>I have a strange problem with my cake (cake_1.2.0.7296-rc2). My start()-action runs twice, under certain circumstances, even though only one request is made.</p> <p>The triggers seem to be : - loading an object like: <code>$this-&gt;Questionnaire-&gt;read(null, $questionnaire_id);</code> - accessing $this-data </p>...
<p>Check your layout for non-existent links, for example a misconfigured link to favicon.ico will cause the controller action to be triggered for a second time. Make sure favicon.ico points towards the webroot rather than the local directory, or else requests will be generated for /controller/action/favicon.ico rather ...
<p>I had the same problem in chrome, I disabled my 'HTML Validator' add on. Which was loading the page twice</p>
8,932
<p>What is the best way to create fluid width/height rounded corners with jQuery?</p> <hr> <p>That plugin doesn't keep the height the same. I have a 10px high div that I want to round the corners on, when I use that script it adds about 10px onto whats there.</p>
<pre><code>$(this).corner(); </code></pre> <p>See: <a href="http://malsup.com/jquery/corner" rel="nofollow noreferrer">malsup.com/jquery/corner</a> and <a href="http://github.com/malsup/corner" rel="nofollow noreferrer">github repository for future ref</a></p>
<p>If you want full control about the border an d gradient, you can use my iQuery Background Canvas plugin. It works with a HTML5 Canvas element and allows to draw borders and backgrounds in any variation. But you should be able to program JavaScript</p> <p>This is a full featured sample with a background gradient and...
5,597
<p>What are the different database options on Windows Mobile available? I have used CEDB and EDB for linear dataset needs.</p> <p>I have heard of SQL server 2005 Mobile edition. But what are the advantages over others (if there is any)</p>
<p>I've found both sqllite and codebase to be easy to implement and install. Easier (and more stable) than the Microsoft options, which seem to be in serious flux.</p>
<p>I would avoid using CEDB any more as I beleave that WM7 is dropping support for it. </p>
7,887
<p>does anyone have a clue why the TortoiseSVN windows client (in Win32 XP and Vista) is so incredible slow when used with Putty and PAM? It seems it connects for each request since datatransfers (checkout) are not slow at all?</p> <p>Any ideas how to change it?</p> <p>Update: I had no problems with SSH before. But I...
<p>Do you have a problem with standard SSH connections to the server as well? If it's generally slow to connect to your server via SSH, this could be a problem with reverse DNS lookups.</p> <p>Andrew</p>
<p>What type of system are you connecting to? If you connect to OpenSUSE, for example, default DNS Reverse Lookup settings generally cause SSH connections to be very slow. If you can, put your client side IP address into the /etc/hosts table on the server. If Reverse DNS is your issue, this will resolve (remember to...
3,551
<p>gnuplot is giving the error: "sh: kpsexpand: not found." </p> <p>I feel like the guy in Office Space when he saw "PC LOAD LETTER". What the heck is kpsexpand?</p> <p>I searched Google, and there were a lot of pages that make reference to kpsexpand, and say not to worry about it, but I can't find anything, anywhere...
<p>kpsexpand, kpsetool and kpsepath are all wrappers for kpsewhich that deals with finding tex-related files kpsexpand is used to expand environment varibles. Say $VAR1 is "Hello World" and $VAR2 is "/home/where/I/belong" then</p> <pre><code>$ kpsexpand $VAR1</code></pre> <p>will return</p> <pre><code>Hello World</c...
<p>This is on the first page of google search results for "kpexpand gnuplot":</p> <p><a href="http://dschneller.blogspot.com/2007/06/visualize-hard-disk-temperature-with.html" rel="nofollow noreferrer">http://dschneller.blogspot.com/2007/06/visualize-hard-disk-temperature-with.html</a></p> <p>It says that you do not ...
9,493
<p>I have one field that I need to sum lets say named items However that field can be part of group a or b In the end I need to have all of the items summed for group a and group b</p> <p>when I say grouped I mean there is a LEFT OUTER JOIN to another table the previous table has a type for the items and the one being...
<p>Maybe I'm not understanding the complexity of what you're asking but... shouldn't this do?</p> <pre><code>SELECT groupname, SUM(value) FROM items WHERE groupname IN ('a', 'b') GROUP BY groupname </code></pre> <p>And if you don't care which of a or b the item belongs to then this will do:</p> <pre><code>SELECT SUM...
<p>Please refer this Image (<a href="https://i.stack.imgur.com/5R9ou.png" rel="nofollow noreferrer">1</a>)</p> <pre><code>SELECT category_id,SUM(amount) AS count FROM expense GROUP BY category_id; </code></pre>
5,044
<p>I am writing an immutable DOM tree in Java, to simplify access from multiple threads.*</p> <p>However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nodes in order to return t...
<p>These days, object creation is pretty dang fast, and the concept of object pooling is kind of obsolete (at least in general; connection pooling is of course still valid).</p> <p>Avoid premature optimization. Create your nodes when you need them when doing your copies, and then see if that becomes prohibitively slo...
<p>I'm a little confused about what you're trying to do in the first place. You want all of the nodes to be immutable AND you want to pool them? Aren't these 2 ideas mutually exclusive? When you pull an object out of the pool, won't you have to invoke a setter to link up the children?</p> <p>I think that using immu...
6,382
<p>I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this</p> <pre><code>LIBRARY "MyLib" EXPORTS Foo Bar </code></pre> <p>with the code defined as this, for example:</p> <pre><code>int Foo(int a); void Bar(int foo); </code></pre> <p>However, what if I wan...
<p>In the code itself, mark the functions you want to export using __declspec(dllexport). For example:</p> <pre><code>#define DllExport __declspec(dllexport) int DllExport Foo( int a ) { // implementation } int DllExport Foo( int a, int b ) { // implementation } </code></pre> <p>If you do this, you do not need ...
<p>There isn't a language or version agnostic way of exporting an overloaded function since the mangling convention can change with each release of the compiler.</p> <p>This is one reason why most WinXX functions have funny names like *Ex or *2.</p>
4,568
<p>I'm getting wavy lines on the first layer only in both the x and y direction identically. The first layer is 0.4 mm with a 0.4 mm tip. The other layers are 0.2 mm. I've tried changing the Z offset all the way from -1.2 to 0.5 mm. I've tried changing the hot end leveling the heated bed. None of these changes affe...
<p>You have a too thick layer: to get straight lines, the plastic has to be squished together to some degree as it is pushed out of the nozzle. The result is a shape similar to a circle with the top and bottom cut. This works well until your layer thickness is more than 3 quarters of the nozzle diameter - above the "sq...
<p>The general recommendation for layer height is to go no thicker than 75% of the nozzle diameter. Your post states 0.4 mm layer height with a 0.4 nozzle, exceeding the recommendation.</p> <p>If your first layer is dropped to 0.3 mm, you'll fall into the recommendation, but the thickness is a reference for ALL layers...
1,545
<p>In php, how can I get the number of apache children that are currently available <br>(<code>status = SERVER_READY</code> in the apache scoreboard)?</p> <p>I'm really hoping there is a simple way to do this in php that I am missing.</p>
<p>You could execute a shell command of <code>ps aux | grep httpd</code> or <code>ps aux | grep apache</code> and count the number of lines in the output.</p> <pre><code>exec('ps aux | grep apache', $output); $processes = count($output); </code></pre> <p>I'm not sure which status in the status column indicates that i...
<p>If you have access to the Apache server status page, try using the ?auto flag:</p> <p><a href="http://yourserver/server-status?auto" rel="nofollow noreferrer">http://yourserver/server-status?auto</a></p> <p>The output is a machine-readable version of the status page. I <em>believe</em> you are looking for "IdleWor...
9,338
<p>In <a href="https://3dprinting.stackexchange.com/a/3116/37">this question</a> I was told that I should use silver solder to connect the heating element to the power supply.</p> <p>(I was also told that a ceramic extruder head was the way to go, but I'm working with what I have)</p> <p>I bought two types of silver ...
<p>The first is not suitable. ASTM96TS Sn96Ag4 has a melting point of 221–229&nbsp;&deg;C according to <a href="https://en.wikipedia.org/wiki/Solder" rel="nofollow noreferrer">Wikipedia</a>. Pb96Ag4 would be OK, but that is not lead free so doesn't seem to match your description. <em>Update from comment to explain the ...
<p>Use ferrules to join wires, and on your board either solder directly (it doesn't matter what solder you use because it's not going to get hot if your wires are gauged properly). Or use soft copper wires and clamping terminals without the wires being tinned or risk a fire hazard. </p> <p>Tinning makes the surface h...
482
<p>I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse.</p> <p>Please, list any features you think are brilliant or useful...
<p>Have you tried <a href="http://www.aptana.com/" rel="nofollow noreferrer">Aptana</a>? It's based on Eclipse and they have a sweet <a href="http://www.aptana.com/rails" rel="nofollow noreferrer">Rails</a> plugin.</p>
<p>+1 for TextMate on Mac OS X.</p> <p>See also answers to <a href="https://stackoverflow.com/questions/16064/what-ide-to-use-for-developing-in-ruby-on-rails-on-windows#16086">this question</a>. I <a href="https://stackoverflow.com/questions/16064/what-ide-to-use-for-developing-in-ruby-on-rails-on-windows#16086">reco...
3,770
<p>I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minutes (usually at least 3) and close to ...
<p>I don't know much about development at that level, but... it seems like it would be a good idea to separate into multiple solutions. You could have a final "pre-ship" step that consolidates them all into a single .dll if you/your customers really insist.</p> <p>Compare, e.g., to the .NET Framework where we have lot...
<p>@Domenic: indeed, it would be a good thing... However, a whole team's been at it for some time now, and until they succeed we are stuck with a single .dll and something quite monolithic :-(</p>
5,933
<p>I'd like to do some server-side scripting using Python. But I'm kind of lost with the number of ways to do that.</p> <p>It starts with the do-it-yourself CGI approach and it seems to end with some pretty robust frameworks that would basically do all the job themselves. And a huge lot of stuff in between, like <a hre...
<p>CGI is great for low-traffic websites, but it has some performance problems for anything else. This is because every time a request comes in, the server starts the CGI application in its own process. This is bad for two reasons: 1) Starting and stopping a process can take time and 2) you can't cache anything in ...
<p>OK, rails is actually pretty good, but there is just a little bit too much magic going on in there (from the Ruby world I would much prefer merb to rails). I personally use Pylons, and am pretty darn happy. I'd say (compared to django), that pylons allows you to interchange ints internal parts easier than django doe...
6,527
<p>I keep thinking it means that I can plug it directly into <a href="http://rads.stackoverflow.com/amzn/click/B007KG0ZYI" rel="nofollow noreferrer">my power supply</a> instead of running it though my RAMPs 1.4; is that correct?</p> <p>Here is the link to it, <a href="http://www.robotdigg.com/product/209" rel="nofollo...
<p>"Mains voltage" is the alternating current provided by your wall outlets (eg 120v in USA). In order to use a mains voltage heatbed in a 3d printer, you will need to wire up your controller to switch an AC SSR. That way, your low-voltage-DC RAMPS board can control AC current. </p> <p>If you plug a heatbed directly i...
<p>"Mains voltage" is the alternating current provided by your wall outlets (eg 120v in USA). In order to use a mains voltage heatbed in a 3d printer, you will need to wire up your controller to switch an AC SSR. That way, your low-voltage-DC RAMPS board can control AC current. </p> <p>If you plug a heatbed directly i...
346
<p>On my <strong>Windows XP</strong> machine Visual Studio 2003 2005 and 2008 all complain that I cannot start debugging my <strong>web application</strong> because I must either be a member of the Debug Users group or of the Administrators group. So, I am an Administrator and I added Debug Users just in case, and it s...
<p>Which users and/or groups are in your "Debug programs" right (under User Rights Assignment)? Maybe that setting got overridden by group policy (Daniel's answer), or just got out of whack for some reason. It should, obviously, include the "Debug Users" group.</p>
<p>You could try running "<code>VsJITDebugger.exe -p &lt;PID&gt;</code>" on the command line. I've had a simalar situation and been able to debug the application using the above.</p> <p>"<code>VsJITDebugger.exe /?</code>" will show you all the options.</p> <p>The PID can be found either in the task manager (view->Sel...
3,281
<p>I am thinking about the design of an iPhone app I'd like to create. One possible problem is that this application will have to run as root (to access certain network ports). In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible with an iPhone app.</p> <p>I've read t...
<p>Section 3.3.4 of the iPhone SDK Agreement suggests that you mustn't work outside your sandbox.</p> <p>Given that <a href="http://speirs.org/2008/09/12/app-store-im-out/" rel="nofollow noreferrer">Apple has been somewhat arbitrary on which applications they permit</a>, you should definitely double-check with them <e...
<p>Doesn't matter one bit if you can do this on your normal desktop computer. The iPhone is not a normal desktop computer.</p> <p>Unlike a desktop computer, the <em>only</em> way to get an application on the iPhone without a jailbreak is to get it from the App Store. The <em>only</em> way to get on the App Store is t...
8,652
<p>I have an Ender 3 that I have been pretty happy with so far, however it recently started an odd behavior and I can't figure out what's causing it. </p> <p>What happens is that the first ~3&nbsp;mm of the print comes out "sloppy". After that, everything clears up and it prints fine for the rest of the print. (Althou...
<p>After much trial and error, I think I finally figured out the solution. </p> <p>Even though I could get better prints by tweaking with the temperatures, I could never totally eliminate the problem. The better I made it look by cooling down the bed, the more likely it would break free and the print would fail comple...
<p>I had similar problem with my Tevo Tarantula. Tried all the options mentioned above as well. It seemed to be Z-axis height related. Changed my Z-axis flexible coupling to a solid coupling which solved it for me.</p>
1,190
<p>I need to print out data into a pre-printed A6 form (1/4 the size of a landsacpe A4). I do not need to print paragraphs of text, just short lines scattered about on the page.</p> <p>All the stuff on MSDN is about priting paragraphs of text. </p> <p>Thanks for any help you can give, Roberto</p>
<p>VARCHAR(255). It won't use all 255 characters of storage, just the storage you need. It's 255 and not 256 because then you have space for 255 plus the null-terminator (or size byte).</p> <p>The "N" is for Unicode. Use if you expect non-ASCII characters.</p>
<p>If you will be supporting languages other than English, you will want to use nvarchar.</p> <p>HTML should be okay as long as it contains standard ASCII characters. I've used nvarchar mainly in databases that were multi-lingual support. </p>
7,813
<p>I've just started skimming 'Debugging MS .Net 2.0 Applications' by John Robbins, and have become confused by his evangelism for Debug.Assert(...).</p> <p>He points out that well-implemented Asserts store the state, somewhat, of an error condition, e.g.:</p> <pre><code>Debug.Assert(i &gt; 3, "i &gt; 3", "This means...
<p>Assertions are not for parameter checking. Parameter checking should always be done (and precisely according to what pre-conditions are specified in your documentation and/or specification), and the <code>ArgumentOutOfRangeException</code> thrown as necessary.</p> <p>Assertions are for testing for "impossible" situ...
<p>Here is by 2 cents.</p> <p>I think that the best way is to use both assertions and exceptions. The main differences between the two methods, imho, if that Assert statements can be removed easily from the application text (defines, conditional attributes...), while Exception thrown are dependent (tipically) by a con...
8,636